Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-03-30 12:59:45 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-02 20:11:51 +0300
commit0a36bfa994582b690a7935fed4c15d42b22bd0ed (patch)
treea3cc8fedbed53f6bfc5e30cfafc5df59100a73e3 /spec/finders
parent4bd0d8e433cdffba9e28a24657104eb2b0b0e761 (diff)
Use HasStatus::AVAILABLE_STATUSES instead of hard coding
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/pipelines_finder_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/finders/pipelines_finder_spec.rb b/spec/finders/pipelines_finder_spec.rb
index cffe5a46622..276a680b457 100644
--- a/spec/finders/pipelines_finder_spec.rb
+++ b/spec/finders/pipelines_finder_spec.rb
@@ -60,13 +60,13 @@ describe PipelinesFinder do
end
end
- %w[running pending success failed canceled skipped].each do |target|
+ HasStatus::AVAILABLE_STATUSES.each do |target|
context "when status is #{target}" do
let(:params) { { status: target } }
let!(:pipeline) { create(:ci_pipeline, project: project, status: target) }
before do
- exception_status = %w[running pending success failed canceled skipped] - [target]
+ exception_status = HasStatus::AVAILABLE_STATUSES - [target]
create(:ci_pipeline, project: project, status: exception_status.sample)
end