diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-12-07 17:11:07 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-12-07 17:11:07 +0000 |
commit | 245fad4d8854e74b6f39c763c2f8d047eeb5f4eb (patch) | |
tree | ebcea65553d80abc995ce753a8bcb185ed5a6875 /spec/controllers/projects | |
parent | 9dffd0ab6b2e9f5b0db55230d8991f50a01f7669 (diff) | |
parent | 5a2a0b284cf721e6cba63fc69fb7550f5039da8a (diff) | |
download | gitlab-ce-245fad4d8854e74b6f39c763c2f8d047eeb5f4eb.tar.gz |
Merge branch '40761-remove-the-checkbox-for-starting-a-new-pipeline-in-auto-devops-settings' into 'master'
Resolve "Remove the checkbox for starting a new pipeline in Auto DevOps settings"
Closes #40761
See merge request gitlab-org/gitlab-ce!15714
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) |