diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-30 18:59:45 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-03 02:11:51 +0900 |
commit | 0a36bfa994582b690a7935fed4c15d42b22bd0ed (patch) | |
tree | a3cc8fedbed53f6bfc5e30cfafc5df59100a73e3 /spec/finders | |
parent | 4bd0d8e433cdffba9e28a24657104eb2b0b0e761 (diff) | |
download | gitlab-ce-0a36bfa994582b690a7935fed4c15d42b22bd0ed.tar.gz |
Use HasStatus::AVAILABLE_STATUSES instead of hard coding
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/pipelines_finder_spec.rb | 4 |
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 |