mentions: include mentioner in subject line.
The template looks like this:
Subject:
#{creator_name} mentioned you in a comment on post ##{post_id}
Body:
@#{creator_name} mentioned you in a \"comment\":/posts/#{post_id}#comment-#{id} on post ##{post_id}:
[quote]
#{DText.excerpt(body, "@"+user_name)}
[/quote]
This commit is contained in:
@@ -57,7 +57,13 @@ class CommentTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
dmail = Dmail.last
|
||||
assert_equal("You were mentioned in a \"comment\":/posts/#{@comment.post_id}#comment-#{@comment.id}\n\n---\n\n[i]#{CurrentUser.name} said:[/i]\n\nHey @#{@user2.name} check this out!", dmail.body)
|
||||
assert_equal(<<-EOS.strip_heredoc, dmail.body)
|
||||
@#{CurrentUser.name} mentioned you in a \"comment\":/posts/#{@comment.post_id}#comment-#{@comment.id} on post ##{@comment.post_id}:
|
||||
|
||||
[quote]
|
||||
Hey @#{@user2.name} check this out!
|
||||
[/quote]
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -51,7 +51,13 @@ class ForumPostTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
dmail = Dmail.last
|
||||
assert_equal("You were mentioned in the forum topic \"#{@topic.title}\":/forum_topics/#{@topic.id}?page=1\n\n---\n\n[i]#{@user.name} said:[/i]\n\nHey @#{@user2.name} check this out!", dmail.body)
|
||||
assert_equal(<<-EOS.strip_heredoc, dmail.body)
|
||||
@#{CurrentUser.name} mentioned you in topic ##{@topic.id} (\"#{@topic.title}\":[/forum_topics/#{@topic.id}?page=1]):
|
||||
|
||||
[quote]
|
||||
Hey @#{@user2.name} check this out!
|
||||
[/quote]
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user