Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
248cefc7
Commit
248cefc7
authored
May 22, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce CE/EE diff in spec/controllers/projects/branches_controller_spec.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
2023ac4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
spec/controllers/projects/branches_controller_spec.rb
spec/controllers/projects/branches_controller_spec.rb
+18
-0
No files found.
spec/controllers/projects/branches_controller_spec.rb
View file @
248cefc7
...
...
@@ -146,6 +146,24 @@ describe Projects::BranchesController do
it_behaves_like
'same behavior between KubernetesService and Platform::Kubernetes'
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
'when create branch service fails'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment