Move identity map into the store, shouldn't have been in the adapter

This commit is contained in:
Robin Ward
2015-03-06 12:56:32 -05:00
parent ecb553af3f
commit 7c25efc095
5 changed files with 122 additions and 88 deletions

View File

@ -0,0 +1,24 @@
module('rest-model');
import createStore from 'helpers/create-store';
test('update', function() {
const store = createStore();
store.find('widget', 123).then(function(widget) {
equal(widget.get('name'), 'Trout Lure');
widget.update({ name: 'new name' }).then(function() {
equal(widget.get('name'), 'new name');
});
});
});
test('destroyRecord', function() {
const store = createStore();
store.find('widget', 123).then(function(widget) {
widget.destroyRecord().then(function(result) {
ok(result);
});
});
});