Skip to content

Commit

Permalink
test(New_WithUnregisteredCurrency): used a better test case
Browse files Browse the repository at this point in the history
  • Loading branch information
hubarthurcoelho committed Apr 8, 2024
1 parent 49c0959 commit cad2027
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions money_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ func TestNew(t *testing.T) {

func TestNew_WithUnregisteredCurrency(t *testing.T) {
const currencyFooCode = "FOO"
const expectedAmount = 1234
const expectedDisplay = "12.34FOO"
const expectedAmount = 100
const expectedDisplay = "1.00FOO"

m := New(1234, currencyFooCode)
m := New(100, currencyFooCode)

if m.amount != expectedAmount {
t.Errorf("Expected amount %d got %d", expectedAmount, m.amount)
Expand Down

0 comments on commit cad2027

Please sign in to comment.