couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject chttpd commit: updated refs/heads/master to 976e68a
Date Wed, 07 Oct 2015 21:06:53 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master a5f5f11a2 -> 976e68ab2


Make sure that database was created and deleted successfully


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/976e68ab
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/976e68ab
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/976e68ab

Branch: refs/heads/master
Commit: 976e68ab2b31536d4d01c55529aa9e10a3425027
Parents: a5f5f11
Author: Alexander Shorin <kxepal@apache.org>
Authored: Thu Oct 8 00:02:19 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Thu Oct 8 00:02:19 2015 +0300

----------------------------------------------------------------------
 test/chttpd_db_test.erl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/976e68ab/test/chttpd_db_test.erl
----------------------------------------------------------------------
diff --git a/test/chttpd_db_test.erl b/test/chttpd_db_test.erl
index 5bcb78d..22eade9 100644
--- a/test/chttpd_db_test.erl
+++ b/test/chttpd_db_test.erl
@@ -28,8 +28,9 @@ teardown(Url) ->
     delete_db(Url).
 
 create_db(Url) ->
-    {ok, _, _, _} = test_request:put(Url,
-                [{"Content-Type", "application/json"}], "{}").
+    {ok, Status, _, _} = test_request:put(Url,
+                [{"Content-Type", "application/json"}], "{}"),
+    ?assert(Status =:= 201 orelse Status =:= 202).
 
 
 create_doc(Url, Id) ->
@@ -37,7 +38,7 @@ create_doc(Url, Id) ->
         [{"Content-Type", "application/json"}], "{\"mr\": \"rockoartischocko\"}").
 
 delete_db(Url) ->
-    {ok, _, _, _} = test_request:delete(Url).
+    {ok, 200, _, _} = test_request:delete(Url).
 
 all_test_() ->
     {


Mime
View raw message