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:
Zach Gollwitzer
2024-06-11 18:47:38 -04:00
committed by GitHub
parent 8372e26864
commit c5704ffd45
12 changed files with 86 additions and 62 deletions

View File

@@ -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