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

Version Path
ende-0.4.25 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.24 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.23 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.5.1 components/indefinido/indemma/master/spec/record/persistable_spec.js
ende-0.4.22 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.21 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.5.0 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.20 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.19 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.18 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.17 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.16 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.3.13 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.3.12 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.3.11 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.15 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.14 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.13 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.12 vendor/components/indefinido-indemma/spec/record/persistable_spec.js
ende-0.4.11 vendor/components/indefinido-indemma/spec/record/persistable_spec.js