aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/outgoing_message_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-03-04 10:46:46 +0000
committerLouise Crow <louise.crow@gmail.com>2014-03-04 10:46:46 +0000
commitede46dc8dc6c97cdad8c3fcb3bd42ede5c25f395 (patch)
tree44e03358c9fa7ca6826e631d1d3d6c1030b1b0d5 /spec/models/outgoing_message_spec.rb
parent8e911d5bd0e60a0e0e4859868662cc176419d2e3 (diff)
parenta38b2989aebf8d554b7287e18528bed8c9e67d3b (diff)
Merge branch 'release/0.17'0.17
Diffstat (limited to 'spec/models/outgoing_message_spec.rb')
-rw-r--r--spec/models/outgoing_message_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/models/outgoing_message_spec.rb b/spec/models/outgoing_message_spec.rb
index bb270ca16..a3e2d1c68 100644
--- a/spec/models/outgoing_message_spec.rb
+++ b/spec/models/outgoing_message_spec.rb
@@ -57,7 +57,8 @@ describe OutgoingMessage, " when making an outgoing message" do
info_request = mock_model(InfoRequest, :public_body => public_body,
:url_title => 'a_test_title',
:title => 'A test title',
- :apply_censor_rules_to_text! => nil)
+ :apply_censor_rules_to_text! => nil,
+ :is_batch_request_template? => false)
outgoing_message = OutgoingMessage.new({
:status => 'ready',
:message_type => 'followup',
@@ -68,6 +69,15 @@ describe OutgoingMessage, " when making an outgoing message" do
outgoing_message.body.should include(expected_text)
end
+ context "when associated with a batch template request" do
+
+ it 'should produce a salutation with a placeholder' do
+ @om.info_request.is_batch_request_template = true
+ @om.get_salutation.should == 'Dear [Authority name],'
+ end
+ end
+
+
describe 'when asked if a user can view it' do
before do
@@ -166,7 +176,7 @@ describe OutgoingMessage, " when censoring data" do
end
end
-describe OutgoingMessage, "when validating the format of the message body", :focus => true do
+describe OutgoingMessage, "when validating the format of the message body" do
it 'should handle a salutation with a bracket in it' do
outgoing_message = FactoryGirl.build(:initial_request)