Sha256: 9dd6a28e324c384501e2874c496f96cb91130005c67dbdd2d29e824ff2aac7e0
Contents?: true
Size: 1.07 KB
Versions: 54
Compression:
Stored size: 1.07 KB
Contents
var persistable, root; root = typeof exports !== "undefined" && exports !== null ? exports : window; persistable = require('indemma/lib/record/persistable'); describe('persistable', function() { return describe('model', function() { it('should set the persistable key', function() { return model.should.have.property('persistable', true); }); return describe('#find', function() { beforeEach(function() { this.person = model.call({ resource: 'person', has_many: 'friends', belongs_to: 'corporation' }); return this.arthur = this.person({ _id: '1', name: 'Arthur Philip Dent' }); }); return it('should call try to store a record after saving', function(done) { var _this = this; sinon.stub(this.person.storage, 'store').returns(true); this.arthur.save(function() { expect(_this.person.storage.store.calledOnce).to.be["true"]; return done(); }); return this.person.storage.store.restore(); }); }); }); });
Version data entries
54 entries across 54 versions & 1 rubygems