mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Keep disabled accounts visible for toggling (#361)
This commit is contained in:
@@ -130,6 +130,28 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_equal "Depository account scheduled for deletion", flash[:notice]
|
||||
end
|
||||
|
||||
test "disabling an account keeps it visible on index" do
|
||||
@account.disable!
|
||||
|
||||
get accounts_path
|
||||
|
||||
assert_response :success
|
||||
assert_includes @response.body, @account.name
|
||||
assert_includes @response.body, "account_#{@account.id}_active"
|
||||
end
|
||||
|
||||
test "toggle_active disables and re-enables an account" do
|
||||
patch toggle_active_account_url(@account)
|
||||
assert_redirected_to accounts_path
|
||||
@account.reload
|
||||
assert @account.disabled?
|
||||
|
||||
patch toggle_active_account_url(@account)
|
||||
assert_redirected_to accounts_path
|
||||
@account.reload
|
||||
assert @account.active?
|
||||
end
|
||||
|
||||
test "select_provider shows available providers" do
|
||||
get select_provider_account_url(@account)
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user