mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
Improve add user to group spec for uppercase usernames
Oops forgot to check for this. See previous commit for more details.
This commit is contained in:
parent
93485facaf
commit
f1ba981ae9
@ -861,7 +861,7 @@ describe GroupsController do
|
|||||||
it "adds by username" do
|
it "adds by username" do
|
||||||
expect do
|
expect do
|
||||||
put "/groups/#{group.id}/members.json",
|
put "/groups/#{group.id}/members.json",
|
||||||
params: { usernames: [user1.username, user2.username].join(",") }
|
params: { usernames: [user1.username, user2.username.upcase].join(",") }
|
||||||
end.to change { group.users.count }.by(2)
|
end.to change { group.users.count }.by(2)
|
||||||
|
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
@ -1075,7 +1075,7 @@ describe GroupsController do
|
|||||||
it "removes by username" do
|
it "removes by username" do
|
||||||
expect do
|
expect do
|
||||||
delete "/groups/#{group1.id}/members.json",
|
delete "/groups/#{group1.id}/members.json",
|
||||||
params: { usernames: [user1.username, user2.username].join(",") }
|
params: { usernames: [user1.username, user2.username.upcase].join(",") }
|
||||||
end.to change { group1.users.count }.by(-2)
|
end.to change { group1.users.count }.by(-2)
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user