Don't allow sending private messages to suspended users. Emails to suspended users should tell them how to respond, since they can't.

This commit is contained in:
Neil Lalonde
2014-05-06 15:01:19 -04:00
parent ba68470d5a
commit f44bd4ec28
5 changed files with 37 additions and 9 deletions

View File

@ -176,6 +176,15 @@ describe UserNotifications do
it "has a from alias" do
expects_build_with(has_entry(:from_alias, "#{username}"))
end
it "should explain how to respond" do
expects_build_with(Not(has_entry(:include_respond_instructions, false)))
end
it "should not explain how to respond if the user is suspended" do
User.any_instance.stubs(:suspended?).returns(true)
expects_build_with(has_entry(:include_respond_instructions, false))
end
end
end