diff options
author | ncshaw <ncshaw@ibm.com> | 2021-07-29 14:41:06 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2021-07-30 16:11:31 -0400 |
commit | ba638783b5d87b855939dae69fd63ffd41cb5ed7 (patch) | |
tree | 695a81a368f528ce543d60e545fee61c5f000273 /test/elixir/test/attachments_test.exs | |
parent | 6f7b77903cddbb4b8392efe4ce80e4fea231dbc1 (diff) | |
download | couchdb-ba638783b5d87b855939dae69fd63ffd41cb5ed7.tar.gz |
Fix response code for existing att and wrong rev
Diffstat (limited to 'test/elixir/test/attachments_test.exs')
-rw-r--r-- | test/elixir/test/attachments_test.exs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/elixir/test/attachments_test.exs b/test/elixir/test/attachments_test.exs index fe694e21f..c89486a8e 100644 --- a/test/elixir/test/attachments_test.exs +++ b/test/elixir/test/attachments_test.exs @@ -106,8 +106,12 @@ defmodule AttachmentsTest do rev = resp.body["rev"] resp = Couch.delete("/#{db_name}/bin_doc/foo.txt", query: %{w: 3}) + assert resp.status_code == 409 + resp = Couch.delete("/#{db_name}/bin_doc/foo.txt", query: %{w: 3, rev: "4-garbage"}) assert resp.status_code == 409 + assert resp.body["error"] == "not_found" + assert resp.body["reason"] == "missing_rev" resp = Couch.delete("/#{db_name}/bin_doc/notexisting.txt", query: %{w: 3, rev: rev}) assert resp.status_code == 404 |