You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2017/11/02 13:42:09 UTC

[GitHub] kxepal commented on a change in pull request #955: Return error 400 on invalid new_edits value

kxepal commented on a change in pull request #955: Return error 400 on invalid new_edits value
URL: https://github.com/apache/couchdb/pull/955#discussion_r148534989
 
 

 ##########
 File path: test/javascript/tests/bulk_docs.js
 ##########
 @@ -110,6 +110,29 @@ couchTests.bulk_docs = function(debug) {
   T(result.error == "bad_request");
   T(result.reason == "POST body must include `docs` parameter.");
 
+
+  // verify that sending a request with invalid `docs` causes error
+  var req = CouchDB.request("POST", "/" + db_name + "/_bulk_docs", {
+    body: JSON.stringify({"docs": "foo"})
+  });
+
+  T(req.status == 400);
+  result = JSON.parse(req.responseText);
+  T(result.error == "bad_request");
+  T(result.reason == "`docs` parameter must be an array.");
 
 Review comment:
   This test looks unrelated to code change. Shouldn't it come with separate commit?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services