From: Shaun McDonald Date: Mon, 10 Nov 2008 19:21:59 +0000 (+0000) Subject: slight more work on the diary test X-Git-Tag: live~8511^2~160 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/f3e382732ace00c7e1893784e2207d9522cc883c slight more work on the diary test --- 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