API: session documentation updated and test added
This commit is contained in:
parent
873db06255
commit
dffc2b8a8b
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue