Merge pull request #3251 from AlexDenisov/api_additional_user_fields
Abilities added to /user and /sign_in requests
This commit is contained in:
commit
306ea84e85
7 changed files with 33 additions and 6 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