More tests and some fixes
This commit is contained in:
parent
e68e058e6a
commit
98aff5cd1a
5 changed files with 118 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
tests = [
|
||||
"testEquality",
|
||||
"testSimpleMapping",
|
||||
"testSimpleCollection",
|
||||
"testObjectReference",
|
||||
|
@ -8,6 +9,19 @@ tests = [
|
|||
function setup() {
|
||||
}
|
||||
|
||||
function testEquality() {
|
||||
var person = new Person();
|
||||
root.persons.add(person);
|
||||
res.commit();
|
||||
var id = person._id;
|
||||
app.clearCache();
|
||||
var person2 = root.persons.get(id);
|
||||
assertNotNull(person2);
|
||||
assertTrue(person !== person2);
|
||||
assertTrue(person._id === person2._id);
|
||||
assertTrue(person == person2);
|
||||
}
|
||||
|
||||
function testSimpleMapping() {
|
||||
|
||||
var data = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue