Permalink
Browse files

Test model: null

  • Loading branch information...
1 parent 62cf6f7 commit f368197ebe62fda4074dd49888dad6a5c3cb7dd6 @kriszyp kriszyp committed Feb 18, 2014
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/Memory.js
View
11 tests/Memory.js
@@ -41,6 +41,17 @@ define([
assert.strictEqual(store.filter({even: true}).data[1].describe(), 'four is not a prime');
},
+ 'no model': function() {
+ var noModelStore = new Memory({
+ data: [
+ {id: 1, name: 'one', prime: false, mappedTo: 'E'}
+ ],
+ model: null
+ });
+ assert.strictEqual(noModelStore.get(1).get, undefined);
+ assert.strictEqual(noModelStore.get(1).save, undefined);
+ },
+
'query': function () {
assert.strictEqual(store.filter({prime: true}).data.length, 3);
assert.strictEqual(store.filter({even: true}).data[1].name, 'four');

0 comments on commit f368197

Please sign in to comment.