Skip to content

Commit

Permalink
updated tests to reflect changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarolivie committed Mar 5, 2025
1 parent c2eea02 commit 7aea03e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addons/it/ticket/invoices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ func TestInvoiceLineTaxes(t *testing.T) {
})
require.NoError(t, inv.Calculate())
err := inv.Validate()
require.EqualError(t, err, "lines: (2: (taxes: (0: (percent: Invalid percentage.).).).).")
require.EqualError(t, err, "lines: (2: (taxes: (0: (percent: must be a valid value.).).).).")
})
}

func TestInvoiceTax(t *testing.T) {
t.Run("invalid PricesInclude", func(t *testing.T) {
inv := exampleStandardInvoice(t)
inv.Tax.PricesInclude = tax.CategoryVAT
inv.Tax.PricesInclude = tax.CategoryGST
require.NoError(t, inv.Calculate())
err := inv.Validate()
require.EqualError(t, err, "tax: (prices_include: must be a valid value.).")
Expand All @@ -177,14 +177,14 @@ func TestInvoiceTax(t *testing.T) {
inv.Tax.PricesInclude = ""
require.NoError(t, inv.Calculate())
err := inv.Validate()
require.EqualError(t, err, "tax: (prices_include: cannot be blank.).")
require.NoError(t, err)
})

t.Run("missing Tax", func(t *testing.T) {
inv := exampleStandardInvoice(t)
inv.Tax = nil
require.NoError(t, inv.Calculate())
err := inv.Validate()
require.EqualError(t, err, "tax: cannot be blank.")
require.NoError(t, err)
})
}

0 comments on commit 7aea03e

Please sign in to comment.