Skip to content
Snippets Groups Projects
Commit dffc2b8a authored by Sebastian Ziebell's avatar Sebastian Ziebell
Browse files

API: session documentation updated and test added

parent 873db062
No related branches found
No related tags found
1 merge request!2835Fix API return codes
Loading
Loading
@@ -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
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment