aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/outgoing_message_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-08-15 12:12:43 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-08-15 14:21:20 +0100
commitf6516d55f75752bf1eb7773f0a09cc6200bc9fad (patch)
tree751ebcc28d051a83019a6607eb32d5ecb09f5423 /spec/models/outgoing_message_spec.rb
parent7c5d08c75536d49b6131c16367d99009d167a4b1 (diff)
Internationalise the salution, making sure it's OK to miss out the public body name as they might in French. Fixes #134.
Diffstat (limited to 'spec/models/outgoing_message_spec.rb')
-rw-r--r--spec/models/outgoing_message_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/outgoing_message_spec.rb b/spec/models/outgoing_message_spec.rb
index a9ef57b4f..1956c4d73 100644
--- a/spec/models/outgoing_message_spec.rb
+++ b/spec/models/outgoing_message_spec.rb
@@ -1,7 +1,10 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe OutgoingMessage, " when making an outgoing message" do
+ fixtures :outgoing_messages, :info_requests, :incoming_messages, :public_bodies, :public_body_translations
+
before do
+ @om = outgoing_messages(:useless_outgoing_message)
@outgoing_message = OutgoingMessage.new({
:status => 'ready',
:message_type => 'initial_request',
@@ -27,6 +30,10 @@ describe OutgoingMessage, " when making an outgoing message" do
it "should include email addresses in outgoing messages" do
@outgoing_message.body.should include("foo@bar.com")
end
+
+ it "should work out a salutation" do
+ @om.get_salutation.should == "Dear Geraldine Quango,"
+ end
end