Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add a simple test for changes since #369

Merged
merged 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 20, 2013
  1. @daleharvey
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 0 deletions.
  1. +20 −0 tests/test.changes.js
View
20 tests/test.changes.js
@@ -42,6 +42,26 @@ adapters.map(function(adapter) {
});
});
+ asyncTest("Changes Since", function () {
+ var docs = [
+ {_id: "0", integer: 0},
+ {_id: "1", integer: 1},
+ {_id: "2", integer: 2},
+ {_id: "3", integer: 3}
+ ];
+ initTestDB(this.name, function(err, db) {
+ db.bulkDocs({docs: docs}, function(err, info) {
+ db.changes({
+ since: 2,
+ complete: function(err, results) {
+ equal(results.results.length, 2, 'Partial results');
+ start();
+ }
+ });
+ });
+ });
+ });
+
asyncTest("Changes doc", function () {
initTestDB(this.name, function(err, db) {
db.post({test:"somestuff"}, function (err, info) {
Something went wrong with that request. Please try again.