mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Add institution management and account editing controls (#868)
* Add institution management * Allow user to select institution on create or edit * Improve redirect behavior * Final cleanup * i18n normalization
This commit is contained in:
parent
8c1a7af37f
commit
9956a9540e
36 changed files with 456 additions and 68 deletions
|
@ -6,6 +6,15 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
|||
@account = accounts(:checking)
|
||||
end
|
||||
|
||||
test "gets accounts list" do
|
||||
get accounts_url
|
||||
assert_response :success
|
||||
|
||||
@user.family.accounts.each do |account|
|
||||
assert_dom "#" + dom_id(account), count: 1
|
||||
end
|
||||
end
|
||||
|
||||
test "new" do
|
||||
get new_account_path
|
||||
assert_response :ok
|
||||
|
@ -19,7 +28,9 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
|||
test "should update account" do
|
||||
patch account_url(@account), params: {
|
||||
account: {
|
||||
is_active: "0"
|
||||
name: "Updated name",
|
||||
is_active: "0",
|
||||
institution_id: institutions(:chase).id
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +44,8 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
|||
account: {
|
||||
accountable_type: "Account::Depository",
|
||||
balance: 200,
|
||||
subtype: "checking"
|
||||
subtype: "checking",
|
||||
institution_id: institutions(:chase).id
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +61,7 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
|||
accountable_type: "Account::Depository",
|
||||
balance: 200,
|
||||
subtype: "checking",
|
||||
institution_id: institutions(:chase).id,
|
||||
start_balance: 100,
|
||||
start_date: 10.days.ago
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue