Skip to content

Commit

Permalink
added tests for validating the toArray() method
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Jul 3, 2012
1 parent 82730f0 commit 7fc6fe0
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/lib/vendor/joli.js
Submodule joli.js updated 3 files
+1 −1 LICENSE
+1 −1 README.markdown
+12 −15 joli.js
12 changes: 12 additions & 0 deletions Resources/test/record.js
@@ -65,5 +65,17 @@
test.john.set('last_name', 'Smith');
expect(test.john.get('last_name')).toBe('Smith');
});

it('joli.record.toArray()', function() {
var johnArray = test.john.toArray();
expect(johnArray.last_name).toBe('Smith');
expect(johnArray.save).toBeUndefined();

var count = 0;
joli.each(johnArray, function(value, key) {
count++;
});
expect(count).toEqual(4);
});
});
})();

0 comments on commit 7fc6fe0

Please sign in to comment.