diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-08-14 13:18:25 +0200 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2018-08-15 11:00:23 +0200 |
commit | 0d7ea0b389b2b6a8787e4960d3b8edd41852dbb2 (patch) | |
tree | f357f20c89ca3462d17ea6ef571c5a49910ce1f8 | |
parent | b8b1c0e37a7f35bbbec73b74e73d125675831ca4 (diff) | |
download | gitlab-ce-0d7ea0b389b2b6a8787e4960d3b8edd41852dbb2.tar.gz |
Reduce number of model instances needed in test.
Closes #49788.
-rw-r--r-- | spec/models/internal_id_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/internal_id_spec.rb b/spec/models/internal_id_spec.rb index 20600f5fa38..f2aad455d5f 100644 --- a/spec/models/internal_id_spec.rb +++ b/spec/models/internal_id_spec.rb @@ -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 } |