From 0d7ba69556a9154793bba681d4ba2e66dd9e771a Mon Sep 17 00:00:00 2001 From: "Renato \"Lond\" Cerqueira" Date: Fri, 8 Nov 2024 14:12:30 +0100 Subject: [PATCH] Fix cookie test --- test/controllers/sessions_controller_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index 845e1ec..66ccbb7 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -6,7 +6,8 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest password = "good_password" RetroMeetClient.expects(:login).returns("good-token") post session_url(sessions: { email:, password: }) - assert_equal "good-token", cookies["Authorization"] + jar = ActionDispatch::Cookies::CookieJar.build(request, cookies.to_hash) + assert_equal "good-token", jar.signed["authorization"] assert_redirected_to root_path end test "on create, should fail with proper message on password error" do