Fixed TestDoGetFallback test

Signed-off-by: Joe Elliott <number101010@gmail.com>
This commit is contained in:
Joe Elliott 2019-12-11 09:36:49 -05:00
parent 393adc9261
commit bd858421cd
1 changed files with 6 additions and 2 deletions

View File

@ -1268,12 +1268,16 @@ func TestDoGetFallback(t *testing.T) {
// Start a local HTTP server.
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
req.ParseForm()
r := &testResponse{
testResp, _ := json.Marshal(&testResponse{
Values: req.Form.Encode(),
Method: req.Method,
})
apiResp := &apiResponse{
Data: testResp,
}
body, _ := json.Marshal(r)
body, _ := json.Marshal(apiResp)
if req.Method == http.MethodPost {
if req.URL.Path == "/blockPost" {