Skip to content

Commit

Permalink
Fixed broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Nov 27, 2015
1 parent 5f0755a commit 1dff079
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/DataView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,27 @@ describe('DataView', function () {
// make a change not affecting the DataView
data.update({id: 1, title: 'Item 1 (changed)'});
assert.deepEqual(dataUpdates, [
['update', {items: [1], data: [{id: 1, title: 'Item 1 (changed)'}]}]
['update', {
items: [1],
data: [{id: 1, title: 'Item 1 (changed)'}],
oldData: [{"group": 1, "id": 1, "title": "Item 1"}]
}]
]);
assert.deepEqual(viewUpdates, []);

// make a change affecting the DataView
data.update({id: 2, title: 'Item 2 (changed)'});
assert.deepEqual(dataUpdates, [
['update', {items: [1], data: [{id: 1, title: 'Item 1 (changed)'}]}],
['update', {items: [2], data: [{id: 2, title: 'Item 2 (changed)'}]}]
['update', {
items: [1],
data: [{id: 1, title: 'Item 1 (changed)'}],
oldData: [{"group": 1, "id": 1, "title": "Item 1"}]
}],
['update', {
items: [2],
data: [{id: 2, title: 'Item 2 (changed)'}],
oldData: [{"group": 2, "id": 2, "title": "Item 2"}]
}]
]);
assert.deepEqual(viewUpdates, [
['update', {items: [2], data: [{id: 2, title: 'Item 2 (changed)'}]}]
Expand Down

0 comments on commit 1dff079

Please sign in to comment.