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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
562b5015
Commit
562b5015
authored
Feb 01, 2017
by
Grzegorz Bizon
Committed by
Filipa Lacerda
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic specs for new merge requests pipelines API
parent
921141ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+23
-11
No files found.
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
562b5015
...
...
@@ -22,22 +22,34 @@ describe Projects::MergeRequestsController do
render_views
let
(
:fork_project
)
{
create
(
:forked_project_with_submodules
)
}
before
{
fork_project
.
team
<<
[
user
,
:master
]
}
before
do
fork_project
.
team
<<
[
user
,
:master
]
context
'when rendering HTML response'
do
it
'renders new merge request widget template'
do
submit_new_merge_request
expect
(
response
).
to
be_success
end
end
context
'when rendering JSON response'
do
it
'renders JSON including serialized pipelines'
do
submit_new_merge_request
(
format: :json
)
expect
(
json_response
).
to
have_key
(
'pipelines'
)
expect
(
response
).
to
be_ok
end
end
end
it
'renders it'
do
def
submit_new_merge_request
(
format: :html
)
get
:new
,
namespace_id:
fork_project
.
namespace
.
to_param
,
project_id:
fork_project
.
to_param
,
merge_request:
{
source_branch:
'remove-submodule'
,
target_branch:
'master'
}
expect
(
response
).
to
be_success
end
target_branch:
'master'
},
format:
format
end
end
...
...
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