Commit 0d7ea0b3 authored by Andreas Brandl's avatar Andreas Brandl

Reduce number of model instances needed in test.

Closes #49788.
parent b8b1c0e3
...@@ -30,7 +30,7 @@ describe InternalId do ...@@ -30,7 +30,7 @@ describe InternalId do
context 'with existing issues' do context 'with existing issues' do
before do before do
rand(1..10).times { create(:issue, project: project) } create_list(:issue, 2, project: project)
described_class.delete_all described_class.delete_all
end end
...@@ -54,7 +54,7 @@ describe InternalId do ...@@ -54,7 +54,7 @@ describe InternalId do
end end
it 'generates a strictly monotone, gapless sequence' do 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) described_class.generate_next(issue, scope, usage, init)
end end
normalized = seq.map { |i| i - seq.min } normalized = seq.map { |i| i - seq.min }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment