Skip to content

Commit

Permalink
Add all_docs with keys body test case
Browse files Browse the repository at this point in the history
Add POST all_docs with keys in the body to confirm that the issue doesn't exist.

#356
  • Loading branch information
pasin committed Apr 9, 2015
1 parent fcbed11 commit a61bd33
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Unit-Tests/Router_Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,20 @@ - (void) test_AllDocs {
{@"doc", $dict({@"message", @"bonjour"},
{@"_id", @"doc3"}, {@"_rev", revID3} )})
));

// keys:
result = SendBody(self, @"POST", @"/db/_all_docs",
$dict({@"keys", $array(@"doc1", @"doc2", @"doc3", @"doc4")}),
kCBLStatusOK, nil);
rows = result[@"rows"];
AssertEqual(rows, $array($dict({@"id", @"doc1"}, {@"key", @"doc1"},
{@"value", $dict({@"rev", revID})}),
$dict({@"id", @"doc2"}, {@"key", @"doc2"},
{@"value", $dict({@"rev", revID2})}),
$dict({@"id", @"doc3"}, {@"key", @"doc3"},
{@"value", $dict({@"rev", revID3})}),
$dict({@"error", @"not_found"}, {@"key", @"doc4"})
));
}


Expand Down

0 comments on commit a61bd33

Please sign in to comment.