Files
fizzy/test/controllers/sessions/transfers_controller_test.rb
T
2025-04-13 08:17:36 +02:00

19 lines
454 B
Ruby

require "test_helper"
class Sessions::TransfersControllerTest < ActionDispatch::IntegrationTest
test "show renders when not signed in" do
get session_transfer_path("some-token")
assert_response :success
end
test "update establishes a session when the code is valid" do
user = users(:david)
put session_transfer_path(user.transfer_id)
assert_redirected_to root_url
assert parsed_cookies.signed[:session_token]
end
end