Commit 58ceb231 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use testCases instead of dataList

parent 33e0e1f9
......@@ -53,10 +53,13 @@ func TestRegisterHandlerInvalidJsonPayload(t *testing.T) {
}
func TestRegisterHandlerMissingData(t *testing.T) {
dataList := []string{`{"token":"token"}`, `{"last_update":"data"}`}
testCases := []string{
`{"token":"token"}`,
`{"last_update":"data"}`,
}
for _, data := range dataList {
expectHandler(t, data, "application/json", http.StatusOK,
for _, testCase := range testCases {
expectHandler(t, testCase, "application/json", http.StatusOK,
"fails on argument validation and proxies request to upstream")
}
}
......
......@@ -68,7 +68,7 @@ func TestReadRequestBodyLimit(t *testing.T) {
rw := httptest.NewRecorder()
req, _ := http.NewRequest("POST", "/test", bytes.NewBuffer(data))
result, err := ReadRequestBody(rw, req, 2)
_, err := ReadRequestBody(rw, req, 2)
assert.Error(t, err)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment