aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/application_controller_spec.rb9
-rw-r--r--spec/models/application_mailer_spec.rb6
2 files changed, 12 insertions, 3 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 08e68d85e..18341ae6f 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -39,7 +39,14 @@ describe ApplicationController, "when caching fragments" do
it "should not fail with long filenames" do
long_name = "blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah.txt"
- path = self.controller.send(:foi_fragment_cache_path, long_name)
+ params = { :only_path => true,
+ :file_name => [long_name],
+ :controller => "request",
+ :action => "get_attachment_as_html",
+ :id => "132",
+ :incoming_message_id => "44",
+ :part => "2" }
+ path = self.controller.send(:foi_fragment_cache_path, params)
self.controller.send(:foi_fragment_cache_write, path, "whassap")
end
diff --git a/spec/models/application_mailer_spec.rb b/spec/models/application_mailer_spec.rb
index a90f79c01..acf5f43bc 100644
--- a/spec/models/application_mailer_spec.rb
+++ b/spec/models/application_mailer_spec.rb
@@ -80,7 +80,8 @@ describe ApplicationMailer do
it 'should raise an error if the template is in neither core nor theme' do
prepend_theme_views('theme_one')
- lambda{ ApplicationMailer.create_neither() }.should raise_error('Missing template application_mailer/neither.erb in view path spec/fixtures/theme_views/theme_one:spec/fixtures/theme_views/core')
+ expected_error = 'Missing template application_mailer/neither.erb in view path'
+ lambda{ ApplicationMailer.create_neither() }.should raise_error(/#{expected_error}/)
end
it 'should render a multipart email using a theme template' do
@@ -125,7 +126,8 @@ describe ApplicationMailer do
it 'should raise an error if the template is in neither core nor theme' do
append_theme_views('theme_one')
- lambda{ ApplicationMailer.create_neither() }.should raise_error('Missing template application_mailer/neither.erb in view path spec/fixtures/theme_views/core:spec/fixtures/theme_views/theme_one')
+ expected_error = 'Missing template application_mailer/neither.erb in view path'
+ lambda{ ApplicationMailer.create_neither() }.should raise_error(/#{expected_error}/)
end
it 'should render a multipart email using a core template' do