From 3a99e36e4448409bf21a0258dde1a82f6494922e Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 24 Nov 2016 16:27:57 +0800 Subject: Avoid using random in the tests, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333#note_18860042 --- spec/models/commit_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/models/commit_spec.rb') diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index a16b2e73dd7..62b77ef86c5 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -208,11 +208,11 @@ eos describe '#status' do context 'without arguments' do before do - 5.times do + %w[success failed created pending].each do |status| create(:ci_empty_pipeline, project: project, sha: commit.sha, - status: Ci::Pipeline.all_state_names.sample) + status: status) end end -- cgit v1.2.1