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
4efc4f5b
Commit
4efc4f5b
authored
Aug 09, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Grape tests.
parent
c53b599e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+5
-10
No files found.
spec/requests/api/users_spec.rb
View file @
4efc4f5b
...
@@ -398,9 +398,9 @@ describe API::API, api: true do
...
@@ -398,9 +398,9 @@ describe API::API, api: true do
end
.
to
change
{
user
.
keys
.
count
}.
by
(
1
)
end
.
to
change
{
user
.
keys
.
count
}.
by
(
1
)
end
end
it
"returns 40
5
for invalid ID"
do
it
"returns 40
0
for invalid ID"
do
post
api
(
"/users/
ASDF
/keys"
,
admin
)
post
api
(
"/users/
999999
/keys"
,
admin
)
expect
(
response
).
to
have_http_status
(
40
5
)
expect
(
response
).
to
have_http_status
(
40
0
)
end
end
end
end
...
@@ -429,11 +429,6 @@ describe API::API, api: true do
...
@@ -429,11 +429,6 @@ describe API::API, api: true do
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
first
[
'title'
]).
to
eq
(
key
.
title
)
expect
(
json_response
.
first
[
'title'
]).
to
eq
(
key
.
title
)
end
end
it
"returns 405 for invalid ID"
do
get
api
(
"/users/ASDF/keys"
,
admin
)
expect
(
response
).
to
have_http_status
(
405
)
end
end
end
end
end
...
@@ -490,8 +485,8 @@ describe API::API, api: true do
...
@@ -490,8 +485,8 @@ describe API::API, api: true do
end
end
it
"raises error for invalid ID"
do
it
"raises error for invalid ID"
do
post
api
(
"/users/
ASDF
/emails"
,
admin
)
post
api
(
"/users/
999999
/emails"
,
admin
)
expect
(
response
).
to
have_http_status
(
40
5
)
expect
(
response
).
to
have_http_status
(
40
0
)
end
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