diff options
author | Bessenyei Balázs Donát <bessbd@apache.org> | 2020-10-07 19:36:49 +0200 |
---|---|---|
committer | Juanjo Rodriguez <jjrodrig@gmail.com> | 2020-10-13 13:19:57 +0200 |
commit | 70b5b3113dc29291ffc0c87b01bbc3c1e32800a9 (patch) | |
tree | 54e127291bc0f42e68e26a048620e319828e01ea /test | |
parent | ce15da09a09407cefdf712eea4c2d20d3e83425f (diff) | |
download | couchdb-70b5b3113dc29291ffc0c87b01bbc3c1e32800a9.tar.gz |
Fix boolean POST to view-like endpoints
Diffstat (limited to 'test')
-rw-r--r-- | test/elixir/test/all_docs_test.exs | 18 | ||||
-rw-r--r-- | test/elixir/test/view_test.exs | 12 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/elixir/test/all_docs_test.exs b/test/elixir/test/all_docs_test.exs index a091dce55..3d07e12e8 100644 --- a/test/elixir/test/all_docs_test.exs +++ b/test/elixir/test/all_docs_test.exs @@ -296,4 +296,22 @@ defmodule AllDocsTest do assert resp.status_code == 200 assert length(Map.get(resp, :body)["rows"]) == 1 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 diff --git a/test/elixir/test/view_test.exs b/test/elixir/test/view_test.exs index 5fb8c009c..728a0ba51 100644 --- a/test/elixir/test/view_test.exs +++ b/test/elixir/test/view_test.exs @@ -140,4 +140,16 @@ defmodule ViewTest do assert resp.status_code == 200 assert length(Map.get(resp, :body)["rows"]) == 1 end + + test "POST with boolean parameter", context do + resp = Couch.post( + "/#{context[:db_name]}/_design/map/_view/some", + body: %{ + :stable => true, + :update => true + } + ) + + assert resp.status_code == 200 + end end |