Added tests

This commit is contained in:
Henry
2016-05-12 14:20:16 -07:00
parent c305fba0a7
commit 69c4c3a2c8
7 changed files with 68 additions and 23 deletions

View File

@@ -55,6 +55,7 @@ define(
"transactionService",
[
"startTransaction",
"size",
"commit",
"cancel"
]
@@ -161,11 +162,9 @@ define(
});
it("returns true if the object has been modified since it" +
" was last persisted", function () {
model.modified = 0;
model.persisted = 0;
mockTransactionService.size.andReturn(0);
expect(capability.dirty()).toBe(false);
model.modified = 1;
mockTransactionService.size.andReturn(1);
expect(capability.dirty()).toBe(true);
});
});