This commit is contained in:
bel
2023-10-24 21:09:02 -06:00
parent 21fed9437f
commit 5d0e7c9a3d
9 changed files with 42 additions and 40 deletions

View File

@@ -39,7 +39,7 @@ func TestFileTestdata(t *testing.T) {
})
t.Run("balances like", func(t *testing.T) {
balances, err := deltas.Like(LikeAcc(`^AssetAccount:`)).Balances()
balances, err := deltas.Like(LikeName(`^AssetAccount:`)).Balances()
if err != nil {
t.Fatal(err)
}
@@ -85,7 +85,7 @@ func TestFileTestdata(t *testing.T) {
})
t.Run("balances like", func(t *testing.T) {
balances, err := deltas.Like(LikeAcc(`AssetAccount:Cash:Fidelity76`)).Balances()
balances, err := deltas.Like(LikeName(`AssetAccount:Cash:Fidelity76`)).Balances()
if err != nil {
t.Fatal(err)
}
@@ -102,28 +102,28 @@ func TestFileDeltas(t *testing.T) {
happy := []Delta{
{
Date: "2022-12-12",
Account: "AssetAccount:Cash:Fidelity76",
Name: "AssetAccount:Cash:Fidelity76",
Value: -97.92,
Currency: USD,
Description: "Electricity / Power Bill TG2PJ-2PLP5",
},
{
Date: "2022-12-12",
Account: "Withdrawal:0:SharedHome:DominionEnergy",
Name: "Withdrawal:0:SharedHome:DominionEnergy",
Value: 97.92,
Currency: USD,
Description: "Electricity / Power Bill TG2PJ-2PLP5",
},
{
Date: "2022-12-12",
Account: "AssetAccount:Cash:Fidelity76",
Name: "AssetAccount:Cash:Fidelity76",
Value: -1.00,
Currency: USD,
Description: "Test pay chase TG32S-BT2FF",
},
{
Date: "2022-12-12",
Account: "Debts:Credit:ChaseFreedomUltdVisa",
Name: "Debts:Credit:ChaseFreedomUltdVisa",
Value: 1.00,
Currency: USD,
Description: "Test pay chase TG32S-BT2FF",