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
1bae64d7
Commit
1bae64d7
authored
Sep 21, 2012
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace
parent
b6244581
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+4
-0
No files found.
spec/requests/api/users_spec.rb
View file @
1bae64d7
...
@@ -47,6 +47,7 @@ describe Gitlab::API do
...
@@ -47,6 +47,7 @@ describe Gitlab::API do
response
.
status
.
should
==
401
response
.
status
.
should
==
401
end
end
end
end
context
"when authenticated"
do
context
"when authenticated"
do
it
"should return array of ssh keys"
do
it
"should return array of ssh keys"
do
user
.
keys
<<
key
user
.
keys
<<
key
...
@@ -67,6 +68,7 @@ describe Gitlab::API do
...
@@ -67,6 +68,7 @@ describe Gitlab::API do
response
.
status
.
should
==
200
response
.
status
.
should
==
200
json_response
[
"title"
].
should
==
key
.
title
json_response
[
"title"
].
should
==
key
.
title
end
end
it
"should return 404 Not Found within invalid ID"
do
it
"should return 404 Not Found within invalid ID"
do
get
api
(
"/user/keys/42"
,
user
)
get
api
(
"/user/keys/42"
,
user
)
response
.
status
.
should
==
404
response
.
status
.
should
==
404
...
@@ -78,6 +80,7 @@ describe Gitlab::API do
...
@@ -78,6 +80,7 @@ describe Gitlab::API do
post
api
(
"/user/keys"
,
user
),
{
title:
"invalid key"
}
post
api
(
"/user/keys"
,
user
),
{
title:
"invalid key"
}
response
.
status
.
should
==
404
response
.
status
.
should
==
404
end
end
it
"should create ssh key"
do
it
"should create ssh key"
do
key_attrs
=
Factory
.
attributes
:key
key_attrs
=
Factory
.
attributes
:key
expect
{
expect
{
...
@@ -94,6 +97,7 @@ describe Gitlab::API do
...
@@ -94,6 +97,7 @@ describe Gitlab::API do
delete
api
(
"/user/keys/
#{
key
.
id
}
"
,
user
)
delete
api
(
"/user/keys/
#{
key
.
id
}
"
,
user
)
}.
to
change
{
user
.
keys
.
count
}.
by
(
-
1
)
}.
to
change
{
user
.
keys
.
count
}.
by
(
-
1
)
end
end
it
"should return 404 Not Found within invalid ID"
do
it
"should return 404 Not Found within invalid ID"
do
delete
api
(
"/user/keys/42"
,
user
)
delete
api
(
"/user/keys/42"
,
user
)
response
.
status
.
should
==
404
response
.
status
.
should
==
404
...
...
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