diff options
author | bikebilly <fabio@gitlab.com> | 2017-12-04 12:27:21 +0100 |
---|---|---|
committer | bikebilly <fabio@gitlab.com> | 2017-12-04 17:47:38 +0100 |
commit | 89d3fcd19346b9884140652a5ef13dd8744c3c43 (patch) | |
tree | f71169208133f3040657fd6dfba2b843afbf235b /spec/controllers/projects | |
parent | 50eb125282ba83e71447161ee2add396fa5eef9b (diff) | |
download | gitlab-ce-89d3fcd19346b9884140652a5ef13dd8744c3c43.tar.gz |
Remove Auto DevOps checkboxes - backend
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r-- | spec/controllers/projects/pipelines_settings_controller_spec.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/controllers/projects/pipelines_settings_controller_spec.rb b/spec/controllers/projects/pipelines_settings_controller_spec.rb index b2d83a02290..1cc488bef32 100644 --- a/spec/controllers/projects/pipelines_settings_controller_spec.rb +++ b/spec/controllers/projects/pipelines_settings_controller_spec.rb @@ -16,14 +16,13 @@ describe Projects::PipelinesSettingsController do patch :update, namespace_id: project.namespace.to_param, project_id: project, - project: { auto_devops_attributes: params, - run_auto_devops_pipeline_implicit: 'false', - run_auto_devops_pipeline_explicit: auto_devops_pipeline } + project: { + auto_devops_attributes: params + } end context 'when updating the auto_devops settings' do let(:params) { { enabled: '', domain: 'mepmep.md' } } - let(:auto_devops_pipeline) { 'false' } it 'redirects to the settings page' do subject @@ -44,7 +43,9 @@ describe Projects::PipelinesSettingsController do end context 'when run_auto_devops_pipeline is true' do - let(:auto_devops_pipeline) { 'true' } + before do + expect_any_instance_of(Projects::UpdateService).to receive(:run_auto_devops_pipeline?).and_return(true) + end it 'queues a CreatePipelineWorker' do expect(CreatePipelineWorker).to receive(:perform_async).with(project.id, user.id, project.default_branch, :web, any_args) @@ -54,7 +55,9 @@ describe Projects::PipelinesSettingsController do end context 'when run_auto_devops_pipeline is not true' do - let(:auto_devops_pipeline) { 'false' } + before do + expect_any_instance_of(Projects::UpdateService).to receive(:run_auto_devops_pipeline?).and_return(false) + end it 'does not queue a CreatePipelineWorker' do expect(CreatePipelineWorker).not_to receive(:perform_async).with(project.id, user.id, :web, any_args) |