mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Account::Sync model and test fixture simplifications (#968)
* Add sync model * Fresh fixtures for sync tests * Sync tests overhaul * Fix entry tests * Complete remaining model test updates * Update system tests * Update demo data task * Add system tests back to PR checks * More simplifications, add empty family to fixtures for easier testing
This commit is contained in:
parent
de5a2e55b3
commit
c6bdf49f10
60 changed files with 929 additions and 1353 deletions
|
@ -71,19 +71,8 @@ class AccountsController < ApplicationController
|
|||
end
|
||||
|
||||
def sync_all
|
||||
synced_accounts_count = 0
|
||||
Current.family.accounts.each do |account|
|
||||
next unless account.can_sync?
|
||||
|
||||
account.sync_later
|
||||
synced_accounts_count += 1
|
||||
end
|
||||
|
||||
if synced_accounts_count > 0
|
||||
redirect_back_or_to accounts_path, notice: t(".success", count: synced_accounts_count)
|
||||
else
|
||||
redirect_back_or_to accounts_path, alert: t(".no_accounts_to_sync")
|
||||
end
|
||||
Current.family.accounts.active.sync
|
||||
redirect_back_or_to accounts_path, notice: t(".success")
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue