From f3e382732ace00c7e1893784e2207d9522cc883c Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Mon, 10 Nov 2008 19:21:59 +0000 Subject: [PATCH] slight more work on the diary test --- test/functional/diary_entry_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/functional/diary_entry_controller_test.rb b/test/functional/diary_entry_controller_test.rb index a8d0adf6d..31c62fe9f 100644 --- a/test/functional/diary_entry_controller_test.rb +++ b/test/functional/diary_entry_controller_test.rb @@ -15,6 +15,13 @@ class DiaryEntryControllerTest < ActionController::TestCase get :new assert_response 302 assert_redirected_to :controller => :user, :action => "login", :referer => "/diary_entry/new" + # Now pretend to login by using the session hash, with the + # id of the person we want to login as through session(:user)=user.id + + # + get(:new, nil, {'user' => users(:normal_user).id}) + assert_response :success + # can't really redirect to the #follow_redirect # Now login -- 2.45.1