[model,refactor][m]: (refs #6, refs #10) get rid of DocumentSet merging its functionality into Dataset.

* In addition fully remove remaining references in models (in getRows and getLength functions) to form of backend (this should have been in previous commit).
This commit is contained in:
rgrp
2011-11-05 20:20:31 +00:00
parent 21d9a1c2dc
commit 3a48044a76
4 changed files with 39 additions and 37 deletions

View File

@@ -31,19 +31,16 @@ test('new Dataset', function () {
expect(6);
dataset.fetch().then(function(dataset) {
equal(dataset.get('name'), metadata.name);
dataset.documentSet.fetch().then(testDS);
});
function testDS(documentSet) {
equal(documentSet.get('headers'), indata.headers);
equal(documentSet.getLength(), 6);
documentSet.getRows(4, 2).then(function(rows) {
equal(dataset.get('headers'), indata.headers);
equal(dataset.getLength(), 6);
dataset.getRows(4, 2).then(function(rows) {
equal(rows[0], indata.rows[2]);
});
documentSet.getRows().then(function(rows) {
dataset.getRows().then(function(rows) {
equal(rows.length, Math.min(10, indata.rows.length));
equal(rows[0], indata.rows[0]);
});
}
});
});
test('Local Data Sync', function() {