Abilities added to /user and /sign_in requests
This commit is contained in:
parent
6956f1f6e1
commit
28e7d1a8bf
5 changed files with 16 additions and 4 deletions
|
@ -13,6 +13,10 @@ describe Gitlab::API do
|
|||
|
||||
json_response['email'].should == user.email
|
||||
json_response['private_token'].should == user.private_token
|
||||
json_response['is_admin'].should == user.is_admin?
|
||||
json_response['can_create_team'].should == user.can_create_team?
|
||||
json_response['can_create_project'].should == user.can_create_project?
|
||||
json_response['can_create_group'].should == user.can_create_group?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -214,6 +214,10 @@ describe Gitlab::API do
|
|||
get api("/user", user)
|
||||
response.status.should == 200
|
||||
json_response['email'].should == user.email
|
||||
json_response['is_admin'].should == user.is_admin?
|
||||
json_response['can_create_team'].should == user.can_create_team?
|
||||
json_response['can_create_project'].should == user.can_create_project?
|
||||
json_response['can_create_group'].should == user.can_create_group?
|
||||
end
|
||||
|
||||
it "should return 401 error if user is unauthenticated" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue