Skip to content

Commit

Permalink
add test to cover invalid type provided to scan
Browse files Browse the repository at this point in the history
  • Loading branch information
theFong committed Jan 20, 2024
1 parent 96f251a commit 9ee705d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions amount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -930,3 +930,11 @@ func TestAmount_Scan(t *testing.T) {
})
}
}

func TestAmount_ScanNonString(t *testing.T) {
var a currency.Amount
err := a.Scan(123)
if err == nil {
t.Errorf("error expected")
}
}

0 comments on commit 9ee705d

Please sign in to comment.