Sha256: 5329fa62db501099e9ceb33ac5370ef8fa9797866442dd2a2ca27bdf7b1739c2
Contents?: true
Size: 656 Bytes
Versions: 6
Compression:
Stored size: 656 Bytes
Contents
require 'test_helper' require 'integration_tests_helper' class TokenTest < ActionDispatch::IntegrationTest def teardown Capybara.reset_sessions! end test 'disabling OTP after successfully enabling' do # log in 1fa user = enable_otp_and_sign_in assert_equal user_otp_credential_path, current_path # otp 2fa fill_in 'user_token', :with => ROTP::TOTP.new(user.otp_auth_secret).at(Time.now) click_button 'Submit Token' assert_equal root_path, current_path # disable OTP disable_otp # logout sign_out # log back in 1fa sign_user_in(user) assert_equal root_path, current_path end end
Version data entries
6 entries across 6 versions & 3 rubygems