From 81da87a137ef11593e931267b9b1f147aec7f375 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 4 Apr 2016 21:10:59 +0800 Subject: [PATCH] update server testing. Signed-off-by: Bo-Yi Wu --- gorush/server_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gorush/server_test.go b/gorush/server_test.go index 543ec8a..2313d04 100644 --- a/gorush/server_test.go +++ b/gorush/server_test.go @@ -67,7 +67,7 @@ func TestRootHandler(t *testing.T) { r := gofight.New() r.GET("/"). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { data := []byte(r.Body.String()) value, _ := jsonparser.GetString(data, "text") @@ -83,7 +83,7 @@ func TestAPIStatusHandler(t *testing.T) { r := gofight.New() r.GET("/api/status"). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { data := []byte(r.Body.String()) value, _ := jsonparser.GetString(data, "go_version") @@ -103,7 +103,7 @@ func TestMissingParameterPushHandler(t *testing.T) { SetJSON(gofight.D{ "platform": 1, }). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { assert.Equal(t, http.StatusBadRequest, r.Code) }) @@ -123,7 +123,7 @@ func TestDisabledIosPushHandler(t *testing.T) { "platform": 1, "message": "Welcome", }). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { assert.Equal(t, http.StatusOK, r.Code) }) @@ -154,7 +154,7 @@ func TestIosPushDevelopment(t *testing.T) { "platform": 1, "message": "Welcome", }). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { assert.Equal(t, http.StatusOK, r.Code) }) @@ -176,7 +176,7 @@ func TestIosPushProduction(t *testing.T) { "platform": 1, "message": "Welcome", }). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { assert.Equal(t, http.StatusOK, r.Code) }) @@ -195,7 +195,7 @@ func TestDisabledAndroidPushHandler(t *testing.T) { "platform": 2, "message": "Welcome", }). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { assert.Equal(t, http.StatusOK, r.Code) }) @@ -217,7 +217,7 @@ func TestAndroidPushHandler(t *testing.T) { "platform": 2, "message": "Welcome", }). - Run(GetMainEngine(), func(r gofight.HttpResponse, rq gofight.HttpRequest) { + Run(GetMainEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { assert.Equal(t, http.StatusOK, r.Code) })