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 2018/07/27 17:43:19 UTC

[GitHub] jaydoane commented on a change in pull request #1468: Port bulk_docs.js

jaydoane commented on a change in pull request #1468: Port bulk_docs.js
URL: https://github.com/apache/couchdb/pull/1468#discussion_r205849444
 
 

 ##########
 File path: test/elixir/test/bulk_docs_test.exs
 ##########
 @@ -0,0 +1,147 @@
+defmodule BulkDocsTest do
+  use CouchTestCase
+
+  @moduletag :bulk_docs
+
+  @moduledoc """
+  Test CouchDB bulk docs
+  This is a port of bulk_docs.js
+  """
+
+  @doc_count 5
+
+  @tag :with_db
+  test "bulk docs can create, update, & delete many docs per request", ctx do
+    db = ctx[:db_name]
+    docs = make_docs(@doc_count)
+    resp = bulk_post(docs, db)
+    assert revs_start_with(resp.body, "1-")
+    docs = revise(docs, resp.body)
 
 Review comment:
   Hmm, `revise` seems like a decent name (to me), since it takes the value of the "rev" field returned from the server and inserts or updates it as `:_rev` into the doc (map).

----------------------------------------------------------------
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