diff --git a/app/models/post_replacement.rb b/app/models/post_replacement.rb index 7caa200b8..5ff7f9183 100644 --- a/app/models/post_replacement.rb +++ b/app/models/post_replacement.rb @@ -90,7 +90,7 @@ class PostReplacement < ActiveRecord::Base module PresenterMethods def comment_replacement_message - "@#{creator.name} replaced this post with a new image:\n\n#{replacement_message}" + %("#{creator.name}":[/users/#{creator.id}] replaced this post with a new image:\n\n#{replacement_message}) end def modaction_replacement_message diff --git a/test/unit/post_replacement_test.rb b/test/unit/post_replacement_test.rb index 83f3aa66e..8b827b133 100644 --- a/test/unit/post_replacement_test.rb +++ b/test/unit/post_replacement_test.rb @@ -94,7 +94,11 @@ class PostReplacementTest < ActiveSupport::TestCase assert_not_nil(comment) assert_equal(User.system.id, comment.creator_id) - assert_match(/@#{@replacer.name} replaced this post/, comment.body) + assert_match(/replaced this post/, comment.body) + end + + should "not send an @mention to the replacer" do + assert_equal(0, @replacer.dmails.size) end end