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:
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