   end
 
   test "show multiple documents - all documents for user-1" do
-    conn = call_get "/documents", "user-1", "pass-1"
+    conn = get_docs "user-1", "pass-1"
 
     result = Core.Utils.atomize(Poison.decode!(conn.resp_body))
     assert length(result.documents) == 2

  end

  test "show multiple documents - only project 'a' documents for anonymous user" do
    conn = call_get "/documents", nil, nil

    result = Core.Utils.atomize(Poison.decode!(conn.resp_body))
    assert length(result.documents) == 1

    conn = call_get "/documents/" <> id, user, pass
    { conn, Core.Utils.atomize(Poison.decode!(conn.resp_body)) }
  end
  defp get_docs do
    get_docs nil, nil
  end
  defp get_docs user, pass do
    conn = call_get "/documents/", user, pass
  end

  defp show_rights user, pass do
    conn = call_get "/auth/show", user, pass
