From 9ee705da0b5a966b27423eeff2a828fa54255f95 Mon Sep 17 00:00:00 2001 From: alecfong1 Date: Sat, 20 Jan 2024 20:49:50 +0000 Subject: [PATCH] add test to cover invalid type provided to scan --- amount_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/amount_test.go b/amount_test.go index dce7e96..4cdf662 100644 --- a/amount_test.go +++ b/amount_test.go @@ -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") + } +}