aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-03-26 16:54:37 +0000
committerGareth Rees <gareth@mysociety.org>2014-03-31 12:22:25 +0100
commitb2acdc723ab7f56ca71f19ddcb571468dd5159ef (patch)
tree25424ba2b3060e5a4be2879bad7c228280f4b812
parenta0169110f90726ef03fdd6fd5e58718eff0b26d1 (diff)
Improve HelpControllerSpec
- Actually assert something when getting the pages - Use named route
-rw-r--r--spec/controllers/help_controller_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
index d552127ba..8ac10e244 100644
--- a/spec/controllers/help_controller_spec.rb
+++ b/spec/controllers/help_controller_spec.rb
@@ -8,6 +8,8 @@ describe HelpController do
it 'shows the about page' do
get :about
+ response.should be_success
+ response.should render_template('help/about')
end
end
@@ -16,6 +18,8 @@ describe HelpController do
it 'shows contact form' do
get :contact
+ response.should be_success
+ response.should render_template('help/contact')
end
describe 'when requesting a page in a supported locale' do
@@ -46,7 +50,7 @@ describe HelpController do
:message => "You really should know!!!\n\nVinny",
}, :submitted_contact_form => 1
}
- response.should redirect_to(:controller => 'general', :action => 'frontpage')
+ response.should redirect_to(frontpage_path)
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1