mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: mixed case group mentions were not getting highligted in composer
This commit is contained in:
@ -1516,6 +1516,7 @@ describe UsersController do
|
||||
describe ".is_local_username" do
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:group) { Fabricate(:group, name: "Discourse") }
|
||||
|
||||
it "finds the user" do
|
||||
xhr :get, :is_local_username, username: user.username
|
||||
@ -1524,6 +1525,13 @@ describe UsersController do
|
||||
expect(json["valid"][0]).to eq(user.username)
|
||||
end
|
||||
|
||||
it "finds the group" do
|
||||
xhr :get, :is_local_username, username: group.name
|
||||
expect(response).to be_success
|
||||
json = JSON.parse(response.body)
|
||||
expect(json["valid_groups"][0]).to eq(group.name)
|
||||
end
|
||||
|
||||
it "supports multiples usernames" do
|
||||
xhr :get, :is_local_username, usernames: [user.username, "system"]
|
||||
expect(response).to be_success
|
||||
|
Reference in New Issue
Block a user