Skip to content

Commit

Permalink
Fix failing test regarding unlocking user accounts
Browse files Browse the repository at this point in the history
There is a failing test in SessionsController where travel_to is
behaving differently in CI vs dev. This PR contains a fix for it.
  • Loading branch information
jayjay-w committed Jan 25, 2024
1 parent ea0eb3f commit 0290f89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/controllers/sessions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def setup
post :create, params: { api_user: { email: '[email protected]', password: '12345679' } }
end

travel_to CheckConfig.get('devise_unlock_accounts_after', 5, :integer) + 1.hours.from_now do
travel_to CheckConfig.get('devise_unlock_accounts_after', 5, :integer).hours.from_now + 1.hour do
u.reload
assert !u.access_locked?
assert_nil u.locked_at
Expand Down

0 comments on commit 0290f89

Please sign in to comment.