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
Kazuhiko Shiozaki
gitlab-ce
Commits
24229185
Commit
24229185
authored
May 26, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some tests to compare api
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f441436e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
spec/requests/api/repositories_spec.rb
spec/requests/api/repositories_spec.rb
+20
-0
No files found.
spec/requests/api/repositories_spec.rb
View file @
24229185
...
...
@@ -112,4 +112,24 @@ describe API::API, api: true do
response
.
status
.
should
==
404
end
end
describe
'GET /GET /projects/:id/repository/compare'
do
it
"should compare 2 branches"
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/compare"
,
user
),
from:
'master'
,
to:
'simple_merge_request'
response
.
status
.
should
==
200
json_response
[
'commits'
].
size
.
should
==
3
end
it
"should compare 2 commits"
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/compare"
,
user
),
from:
'b1e6a9dbf1c85'
,
to:
'1e689bfba395'
response
.
status
.
should
==
200
json_response
[
'commits'
].
size
.
should
==
0
end
it
"should compare 2 commits"
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/compare"
,
user
),
from:
'1e689bfba395'
,
to:
'b1e6a9dbf1c85'
response
.
status
.
should
==
200
json_response
[
'commits'
].
size
.
should
==
4
end
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