Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 20:42:17 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 20:42:17 +0400
commit47d6f70528dd4b41739c0a6767f74a8a40d9aaaa (patch)
tree31107b5a2fead4edd1b2c05d74c242fe2495c94c /spec
parent8ff171f62849d5e418847c1751a802f93604cc61 (diff)
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.rb11
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