Skip to content

Commit

Permalink
better handle driver when checking webauthn
Browse files Browse the repository at this point in the history
  • Loading branch information
colby-swandale committed Dec 4, 2024
1 parent 3bd7db0 commit 07810d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/system/webauthn_verification_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,17 @@ def assert_link_is_expired
end

def assert_poll_status(status)
current_driver = Capybara.current_driver
Capybara.current_driver = :rack_test
@api_key ||= create(:api_key, key: "12345", scopes: %i[push_rubygem], owner: @user)

Capybara.current_driver = :rack_test
page.driver.header "AUTHORIZATION", "12345"

visit status_api_v1_webauthn_verification_path(webauthn_token: @verification.path_token, format: :json)

assert_equal status, JSON.parse(page.text)["status"]

Capybara.current_driver = current_driver
end

def assert_successful_verification_not_found
Expand Down

0 comments on commit 07810d9

Please sign in to comment.