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
Tatuya Kamada
gitlab-ce
Commits
f84d8462
Commit
f84d8462
authored
Mar 10, 2014
by
Greg Messner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests of Create and Update MR description.
parent
7e14f86c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+8
-1
No files found.
spec/requests/api/merge_requests_spec.rb
View file @
f84d8462
...
@@ -92,9 +92,10 @@ describe API::API do
...
@@ -92,9 +92,10 @@ describe API::API do
it
"should return merge_request"
do
it
"should return merge_request"
do
post
api
(
"/projects/
#{
fork_project
.
id
}
/merge_requests"
,
user2
),
post
api
(
"/projects/
#{
fork_project
.
id
}
/merge_requests"
,
user2
),
title:
'Test merge_request'
,
source_branch:
"stable"
,
target_branch:
"master"
,
author:
user2
,
target_project_id:
project
.
id
title:
'Test merge_request'
,
source_branch:
"stable"
,
target_branch:
"master"
,
author:
user2
,
target_project_id:
project
.
id
,
description:
'Test description for Test merge_request'
response
.
status
.
should
==
201
response
.
status
.
should
==
201
json_response
[
'title'
].
should
==
'Test merge_request'
json_response
[
'title'
].
should
==
'Test merge_request'
json_response
[
'description'
].
should
==
'Test description for Test merge_request'
end
end
it
"should not return 422 when source_branch equals target_branch"
do
it
"should not return 422 when source_branch equals target_branch"
do
...
@@ -168,6 +169,12 @@ describe API::API do
...
@@ -168,6 +169,12 @@ describe API::API do
json_response
[
'title'
].
should
==
'New title'
json_response
[
'title'
].
should
==
'New title'
end
end
it
"should return merge_request"
do
put
api
(
"/projects/
#{
project
.
id
}
/merge_request/
#{
merge_request
.
id
}
"
,
user
),
description:
"New description"
response
.
status
.
should
==
200
json_response
[
'description'
].
should
==
'New description'
end
it
"should return 422 when source_branch and target_branch are renamed the same"
do
it
"should return 422 when source_branch and target_branch are renamed the same"
do
put
api
(
"/projects/
#{
project
.
id
}
/merge_request/
#{
merge_request
.
id
}
"
,
user
),
put
api
(
"/projects/
#{
project
.
id
}
/merge_request/
#{
merge_request
.
id
}
"
,
user
),
source_branch:
"master"
,
target_branch:
"master"
source_branch:
"master"
,
target_branch:
"master"
...
...
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