post replacement: don't send @mention dmails to replacer.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user