aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/info_request_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index b2f0a20fc..b32d8a04e 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -564,5 +564,17 @@ describe InfoRequest do
end
+ describe 'when working out a subject for a followup emails' do
+
+ it "should not be confused by an nil subject in the incoming message" do
+ ir = info_requests(:fancy_dog_request)
+ im = mock_model(IncomingMessage,
+ :subject => nil,
+ :valid_to_reply_to? => true)
+ subject = ir.email_subject_followup im
+ subject.should match(/^Re: Freedom of Information request.*fancy dog/)
+ end
+
+ end
end