diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 19:42:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 19:42:17 +0300 |
commit | 47d6f70528dd4b41739c0a6767f74a8a40d9aaaa (patch) | |
tree | 31107b5a2fead4edd1b2c05d74c242fe2495c94c /spec | |
parent | 8ff171f62849d5e418847c1751a802f93604cc61 (diff) | |
download | gitlab-ce-47d6f70528dd4b41739c0a6767f74a8a40d9aaaa.tar.gz |
Add /api/users test for admin role. Updated CHANGELOG
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/users_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index c4728431ec5..c3eec56d133 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -23,6 +23,17 @@ describe API::API, api: true do json_response.first['username'].should == user.username end end + + context "when admin" do + it "should return an array of users" do + get api("/users", admin) + response.status.should == 200 + json_response.should be_an Array + json_response.first.keys.should include 'email' + json_response.first.keys.should include 'extern_uid' + json_response.first.keys.should include 'can_create_project' + end + end end describe "GET /users/:id" do |