You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2020/10/20 13:15:47 UTC

[couchdb] 01/02: Fix boolean POST to view-like endpoints

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 2afc67c38eb7a87dc808dfd6e9dbb51cbfe5234e
Author: Bessenyei Balázs Donát <be...@apache.org>
AuthorDate: Wed Oct 7 19:36:49 2020 +0200

    Fix boolean POST to view-like endpoints
---
 test/elixir/test/all_docs_test.exs | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/test/elixir/test/all_docs_test.exs b/test/elixir/test/all_docs_test.exs
index 5523565..7862f78 100644
--- a/test/elixir/test/all_docs_test.exs
+++ b/test/elixir/test/all_docs_test.exs
@@ -445,4 +445,22 @@ defmodule AllDocsTest do
 
     assert resp.status_code == 200
   end
+
+  @tag :with_db
+  test "POST boolean", context do
+    db_name = context[:db_name]
+
+    resp = Couch.post("/#{db_name}/_bulk_docs", body: %{docs: create_docs(0..3)})
+    assert resp.status_code in [201, 202]
+
+    resp = Couch.post(
+      "/#{db_name}/_all_docs",
+      body: %{
+        :stable => true,
+        :update => true
+      }
+    )
+
+    assert resp.status_code == 200
+  end
 end