DEV: Add test for user deletion
This commit is contained in:
parent
f8aaa2a039
commit
c2afc8a27c
1 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
describe "User SCIM endpoint" do
|
describe "User SCIM endpoints" do
|
||||||
before do
|
before do
|
||||||
SiteSetting.chat_enabled = true
|
SiteSetting.chat_enabled = true
|
||||||
SiteSetting.chat_allowed_groups = Group::AUTO_GROUPS[:everyone]
|
SiteSetting.chat_allowed_groups = Group::AUTO_GROUPS[:everyone]
|
||||||
|
@ -92,4 +92,16 @@ describe "User SCIM endpoint" do
|
||||||
response_content = JSON.parse(response.body)
|
response_content = JSON.parse(response.body)
|
||||||
expect(response_content["displayName"]).to eq("Changed Name")
|
expect(response_content["displayName"]).to eq("Changed Name")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "can delete a user" do
|
||||||
|
create_user
|
||||||
|
response_content = JSON.parse(response.body)
|
||||||
|
delete "/scim_v2/Users/#{response_content["id"]}",
|
||||||
|
headers: {
|
||||||
|
"Authorization" => "Bearer " + scim_api_key.key,
|
||||||
|
"Content-Type" => "application/scim+json"
|
||||||
|
},
|
||||||
|
as: :json
|
||||||
|
expect(response.status).to eq(204)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue