diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-12 08:28:04 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-12 08:28:04 +0000 |
| commit | 54894f9de9bad4fecb2a116d59a03cdd003f84c0 (patch) | |
| tree | 6ce5517cecf23d4e93d7a381a374e1fa6c810cee /rust/actualbudget_to_schist_transformer/tests/common/account_matchers.rs | |
| parent | 8a30bcbdf9264d235bf93da3df8e170cfde53d02 (diff) | |
Moves rust workspace to root
Diffstat (limited to 'rust/actualbudget_to_schist_transformer/tests/common/account_matchers.rs')
| -rw-r--r-- | rust/actualbudget_to_schist_transformer/tests/common/account_matchers.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/rust/actualbudget_to_schist_transformer/tests/common/account_matchers.rs b/rust/actualbudget_to_schist_transformer/tests/common/account_matchers.rs deleted file mode 100644 index 599f31f..0000000 --- a/rust/actualbudget_to_schist_transformer/tests/common/account_matchers.rs +++ /dev/null @@ -1,32 +0,0 @@ -use schist_models::account::Account; - -pub fn get_account_matchers() -> Vec<Box<dyn Fn(&Account) -> bool>> { - vec![ - Box::new(|a| matches_bank_account(a)), - Box::new(|a| matches_cash_account(a)), - ] -} - -fn matches_bank_account(account: &Account) -> bool { - match account { - Account { - name, - opening_balance: 0, - opening_date, - .. - } => name == "My bank account" && *opening_date == "2024-08-01".parse().unwrap(), - _ => false, - } -} - -fn matches_cash_account(account: &Account) -> bool { - match account { - Account { - name, - opening_balance: 0, - opening_date, - .. - } => name == "My cash account" && *opening_date == "2024-08-01".parse().unwrap(), - _ => false, - } -} |
