mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user