2024-02-05 11:00:40 +11:00
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
class AccountsControllerTest < ActionDispatch::IntegrationTest
|
|
|
|
setup do
|
2024-02-27 12:43:49 -05:00
|
|
|
sign_in @user = users(:family_admin)
|
2024-07-10 11:22:59 -04:00
|
|
|
@account = accounts(:depository)
|
2024-02-05 11:00:40 +11:00
|
|
|
end
|
|
|
|
|
2025-05-26 20:05:16 -05:00
|
|
|
test "should get index" do
|
|
|
|
get accounts_url
|
|
|
|
assert_response :success
|
2024-02-05 11:00:40 +11:00
|
|
|
end
|
|
|
|
|
2025-05-26 20:05:16 -05:00
|
|
|
test "should sync account" do
|
|
|
|
post sync_account_url(@account)
|
|
|
|
assert_redirected_to account_url(@account)
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should get chart" do
|
|
|
|
get chart_account_url(@account)
|
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should get sparkline" do
|
|
|
|
get sparkline_account_url(@account)
|
|
|
|
assert_response :success
|
|
|
|
end
|
2024-02-05 11:00:40 +11:00
|
|
|
end
|