From b2acdc723ab7f56ca71f19ddcb571468dd5159ef Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 26 Mar 2014 16:54:37 +0000 Subject: Improve HelpControllerSpec - Actually assert something when getting the pages - Use named route --- spec/controllers/help_controller_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spec/controllers/help_controller_spec.rb') 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 -- cgit v1.2.3