Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Quick check to make sure we're not running into the cURL post fields …

…appending bug.
  • Loading branch information...
commit a45923db0bb7dbbfaf0046e802487c9dd7d84b26 1 parent 7e240b7
@sbisbee authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 tests/SagTest.php
View
20 tests/SagTest.php
@@ -118,6 +118,26 @@ public function test_newDocInvalidType()
}
}
+ public function test_twoPosts() {
+ $docs = array(
+ array("one" => "bwah"),
+ array("two" => "bwah")
+ );
+
+ $this->assertTrue($this->couch->post($docs[0])->body->ok);
+
+ $resp = $this->couch->post($docs[1]);
+ $this->assertTrue($resp->body->ok);
+
+ /*
+ * Make sure the fields didn't get appended:
+ * http://uk3.php.net/manual/en/function.curl-setopt-array.php#104369
+ */
+ $resp = $this->couch->get($resp->body->id);
+ $this->assertEquals($resp->body->two, $docs[1]['two']);
+ $this->assertNotEquals($resp->body->one, $docs[0]['one']);
+ }
+
public function test_getID()
{
$result = $this->couch->get('/1');
Please sign in to comment.
Something went wrong with that request. Please try again.