aboutsummaryrefslogtreecommitdiffstats
path: root/spec/mailers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/application_mailer_spec.rb24
-rw-r--r--spec/mailers/request_mailer_spec.rb2
2 files changed, 13 insertions, 13 deletions
diff --git a/spec/mailers/application_mailer_spec.rb b/spec/mailers/application_mailer_spec.rb
index cc4609e5a..d8993f78f 100644
--- a/spec/mailers/application_mailer_spec.rb
+++ b/spec/mailers/application_mailer_spec.rb
@@ -58,32 +58,32 @@ describe ApplicationMailer do
it 'should render a theme template in preference to a core template' do
prepend_theme_views('theme_one')
- @mail = ApplicationMailer.create_simple()
+ @mail = ApplicationMailer.simple
@mail.body.should match('Theme simple')
end
it 'should render the template provided by the theme if no template is available in core' do
prepend_theme_views('theme_one')
- @mail = ApplicationMailer.create_theme_only()
+ @mail = ApplicationMailer.theme_only
@mail.body.should match('Theme only')
end
it 'should render the template provided by core if there is no theme template' do
prepend_theme_views('theme_one')
- @mail = ApplicationMailer.create_core_only()
+ @mail = ApplicationMailer.core_only
@mail.body.should match('Core only')
end
it 'should render an empty body if the template is in neither core nor theme' do
prepend_theme_views('theme_one')
- @mail = ApplicationMailer.create_neither()
+ @mail = ApplicationMailer.neither
@mail.body.should be_empty
end
it 'should render a multipart email using a theme template' do
prepend_theme_views('theme_one')
create_multipart_method('multipart_theme_only')
- @mail = ApplicationMailer.create_multipart_theme_only()
+ @mail = ApplicationMailer.multipart_theme_only
@mail.parts.size.should == 2
message_part = @mail.parts[0].to_s
message_part.should match("Theme multipart")
@@ -92,7 +92,7 @@ describe ApplicationMailer do
it 'should render a multipart email using a core template' do
prepend_theme_views('theme_one')
create_multipart_method('multipart_core_only')
- @mail = ApplicationMailer.create_multipart_core_only()
+ @mail = ApplicationMailer.multipart_core_only
@mail.parts.size.should == 2
message_part = @mail.parts[0].to_s
message_part.should match("Core multipart")
@@ -104,32 +104,32 @@ describe ApplicationMailer do
it 'should render a core template in preference to a theme template' do
append_theme_views('theme_one')
- @mail = ApplicationMailer.create_simple()
+ @mail = ApplicationMailer.simple
@mail.body.should match('Core simple')
end
it 'should render the template provided by the theme if no template is available in core' do
append_theme_views('theme_one')
- @mail = ApplicationMailer.create_theme_only()
+ @mail = ApplicationMailer.theme_only
@mail.body.should match('Theme only')
end
it 'should render the template provided by core if there is no theme template' do
append_theme_views('theme_one')
- @mail = ApplicationMailer.create_core_only()
+ @mail = ApplicationMailer.core_only
@mail.body.should match('Core only')
end
it 'should render an empty body if the template is in neither core nor theme' do
append_theme_views('theme_one')
- @mail = ApplicationMailer.create_neither()
+ @mail = ApplicationMailer.neither
@mail.body.should be_empty
end
it 'should render a multipart email using a core template' do
append_theme_views('theme_one')
create_multipart_method('multipart_core_only')
- @mail = ApplicationMailer.create_multipart_core_only()
+ @mail = ApplicationMailer.multipart_core_only
@mail.parts.size.should == 2
message_part = @mail.parts[0].to_s
message_part.should match("Core multipart")
@@ -138,7 +138,7 @@ describe ApplicationMailer do
it 'should render a multipart email using a theme template' do
append_theme_views('theme_one')
create_multipart_method('multipart_theme_only')
- @mail = ApplicationMailer.create_multipart_theme_only()
+ @mail = ApplicationMailer.multipart_theme_only
@mail.parts.size.should == 2
message_part = @mail.parts[0].to_s
message_part.should match("Theme multipart")
diff --git a/spec/mailers/request_mailer_spec.rb b/spec/mailers/request_mailer_spec.rb
index 7b7a9b105..18b925b33 100644
--- a/spec/mailers/request_mailer_spec.rb
+++ b/spec/mailers/request_mailer_spec.rb
@@ -312,7 +312,7 @@ describe RequestMailer, 'when sending mail when someone has updated an old uncla
:public_body => @public_body,
:display_status => 'Refused.',
:url_title => 'test_request')
- @mail = RequestMailer.create_old_unclassified_updated(@info_request)
+ @mail = RequestMailer.old_unclassified_updated(@info_request)
end
it 'should have the subject "Someone has updated the status of your request"' do