Merge branch 'ab-49788-reduce-model-instances-in-test' into 'master'
Reduce number of model instances needed in test. Closes #49788 See merge request gitlab-org/gitlab-ce!21192
This commit is contained in:
commit
6010fe86ba
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ describe InternalId do
|
|||
|
||||
context 'with existing issues' do
|
||||
before do
|
||||
rand(1..10).times { create(:issue, project: project) }
|
||||
create_list(:issue, 2, project: project)
|
||||
described_class.delete_all
|
||||
end
|
||||
|
||||
|
@ -54,7 +54,7 @@ describe InternalId do
|
|||
end
|
||||
|
||||
it 'generates a strictly monotone, gapless sequence' do
|
||||
seq = (0..rand(100)).map do
|
||||
seq = Array.new(10).map do
|
||||
described_class.generate_next(issue, scope, usage, init)
|
||||
end
|
||||
normalized = seq.map { |i| i - seq.min }
|
||||
|
|
Loading…
Reference in a new issue