Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
baarkerlounger committed Feb 4, 2022
1 parent ac956cc commit 6d0b6b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/integration/authenticatable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class AuthenticationSanityTest < Devise::IntegrationTest

delete destroy_admin_session_path
assert_response :redirect
assert_redirected_to root_path
assert_response :see_other

get root_path
assert_contain 'Signed out successfully'
Expand All @@ -129,7 +129,7 @@ class AuthenticationSanityTest < Devise::IntegrationTest
test 'unauthenticated admin set message on sign out' do
delete destroy_admin_session_path
assert_response :redirect
assert_redirected_to root_path
assert_response :see_other

get root_path
assert_contain 'Signed out successfully'
Expand Down
6 changes: 3 additions & 3 deletions test/integration/recoverable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def reset_password(options = {}, &block)
user = create_user
reset_password reset_password_token: 'invalid_reset_password'

assert_response :success
assert_response :unprocessable_entity
assert_current_url '/users/password'
assert_have_selector '#error_explanation'
assert_contain %r{Reset password token(.*)invalid}
Expand All @@ -170,7 +170,7 @@ def reset_password(options = {}, &block)
fill_in 'Confirm new password', with: 'other_password'
end

assert_response :success
assert_response :unprocessable_entity
assert_current_url '/users/password'
assert_have_selector '#error_explanation'
assert_contain "Password confirmation doesn't match Password"
Expand All @@ -192,7 +192,7 @@ def reset_password(options = {}, &block)
request_forgot_password

reset_password { fill_in 'Confirm new password', with: 'other_password' }
assert_response :success
assert_response :unprocessable_entity
assert_have_selector '#error_explanation'
refute user.reload.valid_password?('987654321')

Expand Down
2 changes: 1 addition & 1 deletion test/integration/timeoutable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def last_request_at
delete destroy_user_session_path

assert_response :redirect
assert_redirected_to root_path
assert_response :see_other
follow_redirect!
assert_contain 'Signed out successfully'
end
Expand Down

0 comments on commit 6d0b6b5

Please sign in to comment.