mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
* Rename account balance field for clarity `original_balance` and `original_currency` may infer that these values are "original" to the account. In reality, they represent the "current" balance and currency on the account. * Prepare fixture data for account sync testing * Update to new field * Fix conflicts * Remove local schema change
30 lines
753 B
Ruby
30 lines
753 B
Ruby
require "test_helper"
|
|
|
|
class PasswordResetsControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
@user = users(:family_admin)
|
|
end
|
|
|
|
test "new" do
|
|
get new_password_reset_path
|
|
assert_response :ok
|
|
end
|
|
|
|
test "create" do
|
|
assert_enqueued_emails 1 do
|
|
post password_reset_path, params: { email: @user.email }
|
|
assert_redirected_to root_url
|
|
end
|
|
end
|
|
|
|
test "edit" do
|
|
get edit_password_reset_path(token: @user.generate_token_for(:password_reset))
|
|
assert_response :ok
|
|
end
|
|
|
|
test "update" do
|
|
patch password_reset_path(token: @user.generate_token_for(:password_reset)),
|
|
params: { user: { password: "password", password_confirmation: "password" } }
|
|
assert_redirected_to new_session_url
|
|
end
|
|
end
|