mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 07:39:39 +02:00
Improve account internal linking and redirect behavior (#864)
* Fix transaction row link and overflow * Allow user to access imports from account page * Clean up accounts controller, add link to account page from settings * Add link to accounts management from accounts summary page * Cleanup styles
This commit is contained in:
parent
8372e26864
commit
c5704ffd45
12 changed files with 86 additions and 62 deletions
|
@ -16,10 +16,21 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_response :ok
|
||||
end
|
||||
|
||||
test "should update account" do
|
||||
patch account_url(@account), params: {
|
||||
account: {
|
||||
is_active: "0"
|
||||
}
|
||||
}
|
||||
|
||||
assert_redirected_to account_url(@account)
|
||||
assert_equal "Account updated", flash[:notice]
|
||||
end
|
||||
|
||||
test "should create account" do
|
||||
assert_difference -> { Account.count }, +1 do
|
||||
post accounts_path, params: { account: { accountable_type: "Account::Credit" } }
|
||||
assert_redirected_to accounts_url
|
||||
assert_redirected_to account_url(Account.order(:created_at).last)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue