<% @about.moderators.each do |user| %>
-
-
+
+
diff --git a/spec/requests/about_controller_spec.rb b/spec/requests/about_controller_spec.rb
index eb719ae9f7d..73bda70105b 100644
--- a/spec/requests/about_controller_spec.rb
+++ b/spec/requests/about_controller_spec.rb
@@ -38,6 +38,14 @@ RSpec.describe AboutController do
expect(response.status).to eq(200)
expect(response.body).to include("/u/anadminuser")
end
+
+ it "supports unicode usernames" do
+ SiteSetting.unicode_usernames = true
+ Fabricate(:admin, username: "martÃnez")
+ get "/about", headers: { "HTTP_USER_AGENT" => "Googlebot" }
+ expect(response.status).to eq(200)
+ expect(response.body).to include("/u/mart%25C3%25ADnez")
+ end
end
it "serializes stats when 'Guardian#can_see_about_stats?' is true" do
diff --git a/spec/services/group_message_spec.rb b/spec/services/group_message_spec.rb
index 4cd007becfc..76a4011ddb8 100644
--- a/spec/services/group_message_spec.rb
+++ b/spec/services/group_message_spec.rb
@@ -7,8 +7,8 @@ RSpec.describe GroupMessage do
let(:moderators_group) { Group[:moderators].name }
- let!(:admin) { Fabricate.build(:admin, id: 999) }
- let!(:user) { Fabricate.build(:user, id: 111) }
+ fab!(:admin)
+ fab!(:user)
before { Discourse.stubs(:system_user).returns(admin) }
@@ -57,11 +57,10 @@ RSpec.describe GroupMessage do
end
describe "message_params" do
- let(:user) { Fabricate.build(:user, id: 123_123) }
shared_examples "common message params for group messages" do
it "returns the correct params" do
expect(message_params[:username]).to eq(user.username)
- expect(message_params[:user_url]).to be_present
+ expect(message_params[:user_url]).to eq("/u/#{user.username}")
end
end
@@ -87,8 +86,6 @@ RSpec.describe GroupMessage do
GroupMessage.new(moderators_group, :user_automatically_silenced, user: user)
end
- let(:user) { Fabricate.build(:user, id: 123_123) }
-
before do
PostCreator.stubs(:create).returns(stub_everything)
group_message.stubs(:sent_recently_key).returns("the_key")