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
0da5154b
Commit
0da5154b
authored
Dec 30, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix api tests.
parent
7240150c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
spec/requests/api/fork_spec.rb
spec/requests/api/fork_spec.rb
+2
-2
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+2
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+2
-2
No files found.
spec/requests/api/fork_spec.rb
View file @
0da5154b
...
@@ -44,7 +44,7 @@ describe API::API, api: true do
...
@@ -44,7 +44,7 @@ describe API::API, api: true do
it
'should fail on missing project access for the project to fork'
do
it
'should fail on missing project access for the project to fork'
do
post
api
(
"/projects/fork/
#{
project
.
id
}
"
,
user3
)
post
api
(
"/projects/fork/
#{
project
.
id
}
"
,
user3
)
response
.
status
.
should
==
404
response
.
status
.
should
==
404
json_response
[
'message'
].
should
==
'404 Not Found'
json_response
[
'message'
].
should
==
'404
Project
Not Found'
end
end
it
'should fail if forked project exists in the user namespace'
do
it
'should fail if forked project exists in the user namespace'
do
...
@@ -58,7 +58,7 @@ describe API::API, api: true do
...
@@ -58,7 +58,7 @@ describe API::API, api: true do
it
'should fail if project to fork from does not exist'
do
it
'should fail if project to fork from does not exist'
do
post
api
(
'/projects/fork/424242'
,
user
)
post
api
(
'/projects/fork/424242'
,
user
)
response
.
status
.
should
==
404
response
.
status
.
should
==
404
json_response
[
'message'
].
should
==
'404 Not Found'
json_response
[
'message'
].
should
==
'404
Project
Not Found'
end
end
end
end
...
...
spec/requests/api/groups_spec.rb
View file @
0da5154b
...
@@ -91,7 +91,8 @@ describe API::API, api: true do
...
@@ -91,7 +91,8 @@ describe API::API, api: true do
it
"should not create group, duplicate"
do
it
"should not create group, duplicate"
do
post
api
(
"/groups"
,
admin
),
{
name:
"Duplicate Test"
,
path:
group2
.
path
}
post
api
(
"/groups"
,
admin
),
{
name:
"Duplicate Test"
,
path:
group2
.
path
}
response
.
status
.
should
==
404
response
.
status
.
should
==
422
response
.
message
.
should
==
"Unprocessable Entity"
end
end
it
"should return 400 bad request error if name not given"
do
it
"should return 400 bad request error if name not given"
do
...
...
spec/requests/api/projects_spec.rb
View file @
0da5154b
...
@@ -289,7 +289,7 @@ describe API::API, api: true do
...
@@ -289,7 +289,7 @@ describe API::API, api: true do
it
"should return a 404 error if not found"
do
it
"should return a 404 error if not found"
do
get
api
(
"/projects/42"
,
user
)
get
api
(
"/projects/42"
,
user
)
response
.
status
.
should
==
404
response
.
status
.
should
==
404
json_response
[
'message'
].
should
==
'404 Not Found'
json_response
[
'message'
].
should
==
'404
Project
Not Found'
end
end
it
"should return a 404 error if user is not a member"
do
it
"should return a 404 error if user is not a member"
do
...
@@ -340,7 +340,7 @@ describe API::API, api: true do
...
@@ -340,7 +340,7 @@ describe API::API, api: true do
it
"should return a 404 error if not found"
do
it
"should return a 404 error if not found"
do
get
api
(
"/projects/42/events"
,
user
)
get
api
(
"/projects/42/events"
,
user
)
response
.
status
.
should
==
404
response
.
status
.
should
==
404
json_response
[
'message'
].
should
==
'404 Not Found'
json_response
[
'message'
].
should
==
'404
Project
Not Found'
end
end
it
"should return a 404 error if user is not a member"
do
it
"should return a 404 error if user is not a member"
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