1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-22 20:06:21 +02:00

adding nil context.Echo testing

This commit is contained in:
Chase Hutchins 2016-01-29 04:43:55 -08:00
parent 6c29668168
commit 46c7480708

View File

@ -284,6 +284,13 @@ func TestContextNetContext(t *testing.T) {
assert.Equal(t, "val", c.Value("key")) assert.Equal(t, "val", c.Value("key"))
} }
func TestContextEcho(t *testing.T) {
c := new(Context)
// Should be null when initialized without one
assert.Nil(t, c.Echo())
}
func testBind(t *testing.T, c *Context, ct string) { func testBind(t *testing.T, c *Context, ct string) {
c.request.Header.Set(ContentType, ct) c.request.Header.Set(ContentType, ct)
u := new(user) u := new(user)