Commit dffc2b8a8b3ed03f12dc8f41a6f24b96f2605268
1 parent
873db062
Exists in
master
and in
4 other branches
API: session documentation updated and test added
Showing
2 changed files
with
15 additions
and
0 deletions
Show diff stats
doc/api/session.md
spec/requests/api/session_spec.rb
@@ -35,5 +35,15 @@ describe Gitlab::API do | @@ -35,5 +35,15 @@ describe Gitlab::API do | ||
35 | json_response['private_token'].should be_nil | 35 | json_response['private_token'].should be_nil |
36 | end | 36 | end |
37 | end | 37 | end |
38 | + | ||
39 | + context "when empty name" do | ||
40 | + it "should return authentication error" do | ||
41 | + post api("/session"), password: user.password | ||
42 | + response.status.should == 401 | ||
43 | + | ||
44 | + json_response['email'].should be_nil | ||
45 | + json_response['private_token'].should be_nil | ||
46 | + end | ||
47 | + end | ||
38 | end | 48 | end |
39 | end | 49 | end |