Skip to content

Commit 7af6190

Browse files
committed
test: fix for go 1.9
1 parent da8b2d1 commit 7af6190

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cookies_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ func TestCookiesHandler(t *testing.T) {
2929
if len(resp.Cookies()) == 0 {
3030
t.Fatal("no cookies data after 1st request")
3131
}
32-
if g, e := resp.Cookies()[0].String(), "Flavor=Chocolate Chip"; e != g {
32+
cookie := resp.Cookies()[0]
33+
if g, e := (cookie.Name + "=" + cookie.Value), "Flavor=Chocolate Chip"; e != g {
3334
t.Errorf("expected %s; got %s after 1st request", e, g)
3435
}
3536

@@ -41,7 +42,8 @@ func TestCookiesHandler(t *testing.T) {
4142
if len(resp.Cookies()) == 0 {
4243
t.Fatal("no cookies data after 2nd request")
4344
}
44-
if g, e := resp.Cookies()[0].String(), "Flavor=Oatmeal Raisin"; e != g {
45+
cookie = resp.Cookies()[0]
46+
if g, e := (cookie.Name + "=" + cookie.Value), "Flavor=Oatmeal Raisin"; e != g {
4547
t.Errorf("expected %s; got %s after 2nd request", e, g)
4648
}
4749
}

0 commit comments

Comments
 (0)