BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
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
response
.
status
.
should
==
401
end
end
context
"when authenticated"
do
it
"should return array of ssh keys"
do
user
.
keys
<<
key
...
...
@@ -67,6 +68,7 @@ describe Gitlab::API do
response
.
status
.
should
==
200
json_response
[
"title"
].
should
==
key
.
title
end
it
"should return 404 Not Found within invalid ID"
do
get
api
(
"/user/keys/42"
,
user
)
response
.
status
.
should
==
404
...
...
@@ -78,6 +80,7 @@ describe Gitlab::API do
post
api
(
"/user/keys"
,
user
),
{
title:
"invalid key"
}
response
.
status
.
should
==
404
end
it
"should create ssh key"
do
key_attrs
=
Factory
.
attributes
:key
expect
{
...
...
@@ -94,6 +97,7 @@ describe Gitlab::API do
delete
api
(
"/user/keys/
#{
key
.
id
}
"
,
user
)
}.
to
change
{
user
.
keys
.
count
}.
by
(
-
1
)
end
it
"should return 404 Not Found within invalid ID"
do
delete
api
(
"/user/keys/42"
,
user
)
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