Skip to content

Commit

Permalink
(#2426) - Add test to ensure doc_ids dont prevent replication
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed May 31, 2016
1 parent dc78f1e commit 6986609
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/integration/test.replication.js
Expand Up @@ -4404,6 +4404,25 @@ adapters.forEach(function (adapters) {
});
});

it('#2426 doc_ids dont prevent replication', function () {

var db = new PouchDB(dbs.name);
var remote = new PouchDB(dbs.remote);

var writes = [];
for (var i = 0; i < 20; i++) {
writes.push(remote.put({_id: i + ''}));
}

return Promise.all(writes).then(function () {
return db.sync(remote, {batch_size: 10, doc_ids: ['11', '12', '13']});
}).then(function() {
return db.allDocs();
}).then(function(allDocs) {
allDocs.total_rows.should.equal(3);
});
});

});
});

Expand Down

0 comments on commit 6986609

Please sign in to comment.