Damon Zhao 10 年之前
父節點
當前提交
7bf9788326
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      context_test.go

+ 1 - 1
context_test.go

@@ -260,7 +260,7 @@ func TestContextGetCookie(t *testing.T) {
 	c, w, _ := createTestContext()
 	c, w, _ := createTestContext()
 	c.Request, _ = http.NewRequest("GET", "/get", nil)
 	c.Request, _ = http.NewRequest("GET", "/get", nil)
 	c.Request.Header.Set("Cookie", "user=gin")
 	c.Request.Header.Set("Cookie", "user=gin")
-	assert.Equal(t, w.Body.String(), "gin")
+	assert.Equal(t, c.GetCookie("Cookie"), "gin")
 }
 }
 
 
 // Tests that the response is serialized as JSON
 // Tests that the response is serialized as JSON