summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-08-15 12:55:38 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-08-15 12:55:38 +0000
commit6010fe86bae9fd922e6897aeaafdb3bd8633409f (patch)
tree1542225acb58cc874492c40cf425483c5f5353f3
parentc0d42d2ef6b04cf04af5e1a727a4db398407a7e2 (diff)
parent0d7ea0b389b2b6a8787e4960d3b8edd41852dbb2 (diff)
downloadgitlab-ce-6010fe86bae9fd922e6897aeaafdb3bd8633409f.tar.gz
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
-rw-r--r--spec/models/internal_id_spec.rb4
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 }