Test X-Http-Method-Override.
[arvados.git] / lib / controller / router / router_test.go
index b1bc9bce32b202548942dd3869f3ed2073ddaa85..991e907d535b5f60257a4cd49d8580b8f4f8c4cc 100644 (file)
@@ -104,6 +104,14 @@ func (s *RouterSuite) TestOptions(c *check.C) {
                        shouldCall:  "CollectionList",
                        withOptions: arvados.ListOptions{Limit: 123, Offset: 456, IncludeTrash: true, IncludeOldVersions: true},
                },
+               {
+                       method:      "POST",
+                       path:        "/arvados/v1/collections?limit=123",
+                       body:        `{"offset":456,"include_trash":true,"include_old_versions":true}`,
+                       header:      http.Header{"X-Http-Method-Override": {"GET"}, "Content-Type": {"application/json"}},
+                       shouldCall:  "CollectionList",
+                       withOptions: arvados.ListOptions{Limit: 123, Offset: 456, IncludeTrash: true, IncludeOldVersions: true},
+               },
                {
                        method:      "POST",
                        path:        "/arvados/v1/collections?limit=123",