Commit 53fcede5 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix Rubocop offenses in pipeline processing specs

parent ac5bd3b7
...@@ -61,7 +61,7 @@ describe Ci::ProcessPipelineService, '#execute', :services do ...@@ -61,7 +61,7 @@ describe Ci::ProcessPipelineService, '#execute', :services do
fail_running_or_pending fail_running_or_pending
expect(builds_statuses).to eq ['failed', 'pending'] expect(builds_statuses).to eq %w(failed pending)
end end
end end
...@@ -84,22 +84,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do ...@@ -84,22 +84,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test'] expect(builds_names).to eq %w(build test)
expect(builds_statuses).to eq ['success', 'pending'] expect(builds_statuses).to eq %w(success pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test', 'deploy'] expect(builds_names).to eq %w(build test deploy)
expect(builds_statuses).to eq ['success', 'success', 'pending'] expect(builds_statuses).to eq %w(success success pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test', 'deploy', 'cleanup'] expect(builds_names).to eq %w(build test deploy cleanup)
expect(builds_statuses).to eq ['success', 'success', 'success', 'pending'] expect(builds_statuses).to eq %w(success success success pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_statuses).to eq ['success', 'success', 'success', 'success'] expect(builds_statuses).to eq %w(success success success success)
expect(pipeline.reload.status).to eq 'success' expect(pipeline.reload.status).to eq 'success'
end end
end end
...@@ -112,22 +112,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do ...@@ -112,22 +112,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test'] expect(builds_names).to eq %w(build test)
expect(builds_statuses).to eq ['success', 'pending'] expect(builds_statuses).to eq %w(success pending)
fail_running_or_pending fail_running_or_pending
expect(builds_names).to eq ['build', 'test', 'test_failure'] expect(builds_names).to eq %w(build test test_failure)
expect(builds_statuses).to eq ['success', 'failed', 'pending'] expect(builds_statuses).to eq %w(success failed pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test', 'test_failure', 'cleanup'] expect(builds_names).to eq %w(build test test_failure cleanup)
expect(builds_statuses).to eq ['success', 'failed', 'success', 'pending'] expect(builds_statuses).to eq %w(success failed success pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_statuses).to eq ['success', 'failed', 'success', 'success'] expect(builds_statuses).to eq %w(success failed success success)
expect(pipeline.reload.status).to eq 'failed' expect(pipeline.reload.status).to eq 'failed'
end end
end end
...@@ -140,23 +140,23 @@ describe Ci::ProcessPipelineService, '#execute', :services do ...@@ -140,23 +140,23 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test'] expect(builds_names).to eq %w(build test)
expect(builds_statuses).to eq ['success', 'pending'] expect(builds_statuses).to eq %w(success pending)
fail_running_or_pending fail_running_or_pending
expect(builds_names).to eq ['build', 'test', 'test_failure'] expect(builds_names).to eq %w(build test test_failure)
expect(builds_statuses).to eq ['success', 'failed', 'pending'] expect(builds_statuses).to eq %w(success failed pending)
fail_running_or_pending fail_running_or_pending
expect(builds_names).to eq ['build', 'test', 'test_failure', 'cleanup'] expect(builds_names).to eq %w(build test test_failure cleanup)
expect(builds_statuses).to eq ['success', 'failed', 'failed', 'pending'] expect(builds_statuses).to eq %w(success failed failed pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test', 'test_failure', 'cleanup'] expect(builds_names).to eq %w(build test test_failure cleanup)
expect(builds_statuses).to eq ['success', 'failed', 'failed', 'success'] expect(builds_statuses).to eq %w(success failed failed success)
expect(pipeline.reload.status).to eq('failed') expect(pipeline.reload.status).to eq('failed')
end end
end end
...@@ -169,22 +169,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do ...@@ -169,22 +169,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test'] expect(builds_names).to eq %w(build test)
expect(builds_statuses).to eq ['success', 'pending'] expect(builds_statuses).to eq %w(success pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_names).to eq ['build', 'test', 'deploy'] expect(builds_names).to eq %w(build test deploy)
expect(builds_statuses).to eq ['success', 'success', 'pending'] expect(builds_statuses).to eq %w(success success pending)
fail_running_or_pending fail_running_or_pending
expect(builds_names).to eq ['build', 'test', 'deploy', 'cleanup'] expect(builds_names).to eq %w(build test deploy cleanup)
expect(builds_statuses).to eq ['success', 'success', 'failed', 'pending'] expect(builds_statuses).to eq %w(success success failed pending)
succeed_running_or_pending succeed_running_or_pending
expect(builds_statuses).to eq ['success', 'success', 'failed', 'success'] expect(builds_statuses).to eq %w(success success failed success)
expect(pipeline.reload.status).to eq('failed') expect(pipeline.reload.status).to eq('failed')
end end
end end
...@@ -198,8 +198,8 @@ describe Ci::ProcessPipelineService, '#execute', :services do ...@@ -198,8 +198,8 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending succeed_running_or_pending
expect(builds.running_or_pending).not_to be_empty expect(builds.running_or_pending).not_to be_empty
expect(builds_names).to eq ['build', 'test'] expect(builds_names).to eq %w(build test)
expect(builds_statuses).to eq ['success', 'pending'] expect(builds_statuses).to eq %w(success pending)
cancel_running_or_pending cancel_running_or_pending
......
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