Skip to content

Commit a2d4dc8

Browse files
committed
Add test for asError()
1 parent 621268f commit a2d4dc8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/error_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ func TestServiceErrorUnwrap(t *testing.T) {
4040
})
4141
}
4242
}
43+
44+
func TestAsError(t *testing.T) {
45+
err := MissingFieldError("foo", "bar")
46+
se := asError(err)
47+
if err != se {
48+
t.Errorf("got %#v, want %#v", se, err)
49+
}
50+
}

0 commit comments

Comments
 (0)