diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-06-12 09:55:16 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-06-12 09:55:16 +0100 |
commit | f560987ab0d3ea3471837a2b30d30c7101dc5616 (patch) | |
tree | c27a235cbafc540e887f3d98feadf8c8fe4a0026 /spec/controllers/request_controller_spec.rb | |
parent | 4a4367ba4ec43aea7a0eb19c4a06bb004abd01eb (diff) |
Make emails requesting admin attention appear to come from the user who requested the attention, not the user who made the original request.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index c70284748..daa26c71e 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1883,6 +1883,16 @@ describe RequestController, "when reporting a request" do response.body.should include("The site administrators have reviewed this request") end + it "should send an email from the reporter to admins" do + ir = info_requests(:badger_request) + title = ir.url_title + post :report_request, :url_title => title + deliveries = ActionMailer::Base.deliveries + deliveries.size.should == 1 + mail = deliveries[0] + mail.subject.should =~ /attention_requested/ + mail.from.should include(@user.email) + end end |