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
dffc2b8a
Commit
dffc2b8a
authored
Feb 27, 2013
by
Sebastian Ziebell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API: session documentation updated and test added
parent
873db062
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
doc/api/session.md
doc/api/session.md
+5
-0
spec/requests/api/session_spec.rb
spec/requests/api/session_spec.rb
+10
-0
No files found.
doc/api/session.md
View file @
dffc2b8a
...
...
@@ -21,3 +21,8 @@ Parameters:
"blocked"
:
true
}
```
Return values:
+
`201 Created`
on success
+
`401 Unauthorized`
if the authentication process failed, e.g. invalid password or attribute not given
spec/requests/api/session_spec.rb
View file @
dffc2b8a
...
...
@@ -35,5 +35,15 @@ describe Gitlab::API do
json_response
[
'private_token'
].
should
be_nil
end
end
context
"when empty name"
do
it
"should return authentication error"
do
post
api
(
"/session"
),
password:
user
.
password
response
.
status
.
should
==
401
json_response
[
'email'
].
should
be_nil
json_response
[
'private_token'
].
should
be_nil
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