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

garren pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit d66e95afef1b25d13bad21e5597ef5a17209628a
Author: Garren Smith <[email protected]>
AuthorDate: Wed May 6 15:09:17 2020 +0200

    mix format all_docs_test.exs
---
 test/elixir/test/all_docs_test.exs | 123 ++++++++++++++++++++-----------------
 1 file changed, 65 insertions(+), 58 deletions(-)

diff --git a/test/elixir/test/all_docs_test.exs 
b/test/elixir/test/all_docs_test.exs
index 46ab1f8..21c136d 100644
--- a/test/elixir/test/all_docs_test.exs
+++ b/test/elixir/test/all_docs_test.exs
@@ -188,34 +188,36 @@ defmodule AllDocsTest do
   test "GET with one key", context do
     db_name = context[:db_name]
 
-    {:ok, _} = create_doc(
-      db_name,
-      %{
-        _id: "foo",
-        bar: "baz"
-      }
-    )
+    {:ok, _} =
+      create_doc(
+        db_name,
+        %{
+          _id: "foo",
+          bar: "baz"
+        }
+      )
 
-    {:ok, _} = create_doc(
-      db_name,
-      %{
-        _id: "foo2",
-        bar: "baz2"
-      }
-    )
+    {:ok, _} =
+      create_doc(
+        db_name,
+        %{
+          _id: "foo2",
+          bar: "baz2"
+        }
+      )
 
-    resp = Couch.get(
-      "/#{db_name}/_all_docs",
-      query: %{
-        :key => "\"foo\"",
-      }
-    )
+    resp =
+      Couch.get(
+        "/#{db_name}/_all_docs",
+        query: %{
+          :key => "\"foo\""
+        }
+      )
 
     assert resp.status_code == 200
     assert length(Map.get(resp, :body)["rows"]) == 1
   end
 
-
   @tag :with_db
   test "POST with empty body", context do
     db_name = context[:db_name]
@@ -223,10 +225,11 @@ defmodule AllDocsTest do
     resp = Couch.post("/#{db_name}/_bulk_docs", body: %{docs: 
create_docs(0..2)})
     assert resp.status_code in [201, 202]
 
-    resp = Couch.post(
-      "/#{db_name}/_all_docs",
-      body: %{}
-    )
+    resp =
+      Couch.post(
+        "/#{db_name}/_all_docs",
+        body: %{}
+      )
 
     assert resp.status_code == 200
     assert length(Map.get(resp, :body)["rows"]) == 3
@@ -239,12 +242,13 @@ defmodule AllDocsTest do
     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: %{
-        :keys => [1]
-      }
-    )
+    resp =
+      Couch.post(
+        "/#{db_name}/_all_docs",
+        body: %{
+          :keys => [1]
+        }
+      )
 
     assert resp.status_code == 200
     rows = resp.body["rows"]
@@ -259,14 +263,15 @@ defmodule AllDocsTest do
     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: %{
-        :keys => ["1", "2"],
-        :limit => 1,
-        :include_docs => true
-      }
-    )
+    resp =
+      Couch.post(
+        "/#{db_name}/_all_docs",
+        body: %{
+          :keys => ["1", "2"],
+          :limit => 1,
+          :include_docs => true
+        }
+      )
 
     assert resp.status_code == 200
     rows = resp.body["rows"]
@@ -346,15 +351,16 @@ defmodule AllDocsTest do
     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",
-      query: %{
-        :limit => 1
-      },
-      body: %{
-        :keys => [1, 2]
-      }
-    )
+    resp =
+      Couch.post(
+        "/#{db_name}/_all_docs",
+        query: %{
+          :limit => 1
+        },
+        body: %{
+          :keys => [1, 2]
+        }
+      )
 
     assert resp.status_code == 200
     assert length(Map.get(resp, :body)["rows"]) == 1
@@ -367,16 +373,17 @@ defmodule AllDocsTest do
     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",
-      query: %{
-        :limit => 1
-      },
-      body: %{
-        :keys => [1, 2],
-        :limit => 2
-      }
-    )
+    resp =
+      Couch.post(
+        "/#{db_name}/_all_docs",
+        query: %{
+          :limit => 1
+        },
+        body: %{
+          :keys => [1, 2],
+          :limit => 2
+        }
+      )
 
     assert resp.status_code == 200
     assert length(Map.get(resp, :body)["rows"]) == 1

Reply via email to