Skip to content

Commit 4989304

Browse files
tests: fix some tests
1 parent a24c66d commit 4989304

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

rest/method_get_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,6 @@ func TestGetListFieldHandler(t *testing.T) {
248248
ResponseBody: `[{"foo": "bar"}]`,
249249
ResponseHeader: http.Header{"Etag": []string{`W/"d41d8cd98f00b204e9800998ecf8427e"`}},
250250
},
251-
`fields:foo:minimal`: {
252-
Init: sharedInit,
253-
NewRequest: func() (*http.Request, error) {
254-
r, err := http.NewRequest("GET", `/foo?fields=foo`, nil)
255-
r.Header.Set("Prefer", "return=minimal")
256-
return r, err
257-
},
258-
ResponseCode: 204,
259-
ResponseBody: ``,
260-
ResponseHeader: http.Header{"Etag": []string{`W/"d41d8cd98f00b204e9800998ecf8427e"`}},
261-
},
262251
`fields:foo(bar:baz)`: {
263252
Init: sharedInit,
264253
NewRequest: func() (*http.Request, error) {

rest/method_item_put_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,10 @@ func TestPutItem(t *testing.T) {
248248
r.Header.Set("If-Match", "W/b")
249249
return r, nil
250250
},
251-
ResponseCode: http.StatusOK,
252-
ResponseBody: `{"id": "2", "foo": "baz"}`,
253-
ExtraTest: checkPayload("foo", "2", map[string]interface{}{"id": "2", "foo": "baz"}),
251+
ResponseCode: http.StatusOK,
252+
ResponseBody: `{"id": "2", "foo": "baz"}`,
253+
ResponseHeader: http.Header{"Etag": []string{`W/"b89c2acfea8a49933a3387f0e3fb0527"`}},
254+
ExtraTest: checkPayload("foo", "2", map[string]interface{}{"id": "2", "foo": "baz"}),
254255
},
255256
`pathID:found,body:valid,header["If-Unmodified-Since"]:invalid`: {
256257
Init: sharedInit,

0 commit comments

Comments
 (0)