From 9249268bd7d3b0585dda7b6a5943d44570aab823 Mon Sep 17 00:00:00 2001 From: francis Date: Thu, 20 Mar 2008 11:58:20 +0000 Subject: Improvements to test code for requests, users and admin. --- spec/controllers/request_controller_spec.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'spec/controllers/request_controller_spec.rb') diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 5b7da626e..dd74829d4 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -287,11 +287,12 @@ describe RequestController, "sending overdue request alerts" do mail_url = $1 mail_token = $2 - #session[:user_id].should be_nil - # XXX this is so dumb - I just want to call the user controller here, bloody let me - #get :controller => :user, :action => :confirm, :email_token => mail_token - #session[:user_id].should == info_requests(:naughty_chicken_request).user.id - #response.should redirect_to(:action => 'show_response', :id => info_requests(:naughty_chicken_request).id) + session[:user_id].should be_nil + controller.test_code_redirect_by_email_token(mail_token, self) # XXX hack to avoid having to call User controller for email link + session[:user_id].should == info_requests(:naughty_chicken_request).user.id + + response.should render_template('show_response') + assigns[:info_request].should == info_requests(:naughty_chicken_request) end end -- cgit v1.2.3