summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-11-24 16:27:57 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-11-24 16:27:57 +0800
commit3a99e36e4448409bf21a0258dde1a82f6494922e (patch)
tree43e438319b25560a87b8e24044df8542ce291581
parent6264b2dfc2a43718921568b947a80651dcc5b2d0 (diff)
downloadgitlab-ce-3a99e36e4448409bf21a0258dde1a82f6494922e.tar.gz
Avoid using random in the tests, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333#note_18860042
-rw-r--r--spec/models/commit_spec.rb4
1 files changed, 2 insertions, 2 deletions
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