diff --git a/web/request_test.go b/web/request_test.go index 733f00b..dc39242 100644 --- a/web/request_test.go +++ b/web/request_test.go @@ -10,14 +10,14 @@ func TestJSONRequest(t *testing.T) { assert := assert.New(t) data := struct { - IP string `json:"ip"` + IP string `json:"query"` }{} - err := JSONRequest("http://ip.jsontest.com/", &data) + err := JSONRequest("http://ip-api.com/json/?fields=query", &data) assert.NoError(err) assert.NotEqual("", data.IP) wrongData := "" - err = JSONRequest("http://ip.jsontest.com/", &wrongData) + err = JSONRequest("http://ip-api.com/json/?fields=query", &wrongData) assert.Error(err) wrongData = ""