summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-17 09:36:00 +0100
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-17 09:36:00 +0100
commit51300d9b2a65a43742985847376150229b91c4ca (patch)
tree6e668def9790d94210e911b65c9ba56347d4e37e /spec
parentcde7eee73e611ca7f775e179fb07b931c37f54ae (diff)
downloadgitlab-ce-51300d9b2a65a43742985847376150229b91c4ca.tar.gz
API support for setting External flag on existing users
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/users_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 5366a7bd06b..679227bf881 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -282,6 +282,13 @@ describe API::API, api: true do
expect(user.reload.admin).to eq(true)
end
+ it "should update external status" do
+ put api("/users/#{user.id}", admin), { external: true }
+ expect(response.status).to eq 200
+ expect(json_response['external']).to eq(true)
+ expect(user.reload.external?).to be_truthy
+ end
+
it "should not update admin status" do
put api("/users/#{admin_user.id}", admin), { can_create_group: false }
expect(response.status).to eq(200)