Skip to content

Commit

Permalink
extract error for test
Browse files Browse the repository at this point in the history
  • Loading branch information
syntaqx committed Jun 28, 2024
1 parent 7a65e34 commit 7754048
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cookie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,13 @@ func TestPopulateFromCookies_UnsupportedType(t *testing.T) {
if err == nil {
t.Error("Expected error, got nil")
}

if _, ok := err.(*UnsupportedTypeError); !ok {
t.Errorf("Expected error of type UnsupportedTypeError, got %T", err)
}

expected := "cookie: unsupported type: complex64"
if err.Error() != expected {
t.Errorf("Expected error message %s, got %s", expected, err.Error())
}
}

0 comments on commit 7754048

Please sign in to comment.