aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-03-17 18:53:30 +0000
committerfrancis <francis>2008-03-17 18:53:30 +0000
commit6bb7f6249c3a3beba2e3d7025448f200f927f1b7 (patch)
tree95330958a75cee1eed471b32a0e28ec903854733 /spec/models/info_request_spec.rb
parent5c3c26c6105ed4912190fb8255cf84616c465479 (diff)
If request is deleted, then send email on to admin, rather than raising an
exception that goes to the public body in a delivery failure.
Diffstat (limited to 'spec/models/info_request_spec.rb')
-rw-r--r--spec/models/info_request_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index add67b44f..1607c85ba 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -17,6 +17,12 @@ describe InfoRequest, " when emailing" do
found_info_request.should == (@info_request)
end
+ it "should return nil when receiving email for a deleted request" do
+ deleted_request_address = InfoRequest.magic_email_for_id("request-", 98765)
+ found_info_request = InfoRequest.find_by_incoming_email(deleted_request_address)
+ found_info_request.should be_nil
+ end
+
end