diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-22 18:31:07 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-28 20:47:59 +0900 |
commit | 45f2d0af4173ae8e06b548c4bef1fabe14353c85 (patch) | |
tree | 4036b5f257b0f07a42431a2c2cff41dcbdd28dd1 /spec/controllers/projects/branches_controller_spec.rb | |
parent | a8e2094c6591336405a90e4185e89752d38965bf (diff) | |
download | gitlab-ce-45f2d0af4173ae8e06b548c4bef1fabe14353c85.tar.gz |
Add test suit for platform::kubernetes
Diffstat (limited to 'spec/controllers/projects/branches_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/branches_controller_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb index 973d6fed288..019ffc44c07 100644 --- a/spec/controllers/projects/branches_controller_spec.rb +++ b/spec/controllers/projects/branches_controller_spec.rb @@ -130,6 +130,24 @@ describe Projects::BranchesController do expect(response.location).to include(project_new_blob_path(project, branch)) expect(response).to have_gitlab_http_status(302) end + + it 'redirects to autodeploy setup page' do + result = { status: :success, branch: double(name: branch) } + + create(:cluster, :provided_by_gcp, projects: [project]) + + expect_any_instance_of(CreateBranchService).to receive(:execute).and_return(result) + expect(SystemNoteService).to receive(:new_issue_branch).and_return(true) + + post :create, + namespace_id: project.namespace.to_param, + project_id: project.to_param, + branch_name: branch, + issue_iid: issue.iid + + expect(response.location).to include(project_new_blob_path(project, branch)) + expect(response).to have_gitlab_http_status(302) + end end context 'without issue feature access' do |