aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/user/contact.rhtml2
-rw-r--r--spec/models/info_request_spec.rb1
-rw-r--r--spec/spec_helper.rb13
3 files changed, 15 insertions, 1 deletions
diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.rhtml
index 6cb8c2f64..e6736dfd3 100644
--- a/app/views/user/contact.rhtml
+++ b/app/views/user/contact.rhtml
@@ -9,7 +9,7 @@
<% form_for :contact do |f| %>
<div class="form_note">
- <h1><%= _("Contact {{recipient}}", :recipient => h @recipient_user.name) %></h1>
+ <h1><%= _("Contact {{recipient}}", :recipient => h(@recipient_user.name)) %></h1>
</div>
<p>
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index 21b26f067..230884c38 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -398,6 +398,7 @@ describe InfoRequest do
it 'should return true if it is awaiting description, isn\'t the holding pen and hasn\'t had an event in 21 days' do
@info_request.is_old_unclassified?.should be_true
end
+ end
context "with regexp censor rule" do
before do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index a7f3020c1..c11c7c5bc 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -206,3 +206,16 @@ def load_test_categories
"Miscellaneous",
[ "other", "Miscellaneous", "miscellaneous" ],])
end
+
+
+# Monkeypatch applicationcontroller because the `render_to_string`
+# method in the original breaks all the rspec test assertions such as
+# `should render_template('foo')`. Same problem as
+# http://stackoverflow.com/questions/8174415/is-it-possible-to-assert-template-or-render-template-against-the-same-partial-wi
+# - a bug in either Rails or Rspec I don't have the time to fix :(
+
+class ApplicationController < ActionController::Base
+ def set_popup_banner
+ @popup_banner = nil
+ end
+end