More tests and some fixes

This commit is contained in:
hns 2009-09-18 19:09:52 +00:00
parent e68e058e6a
commit 98aff5cd1a
5 changed files with 118 additions and 9 deletions

View file

@ -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 = {