Sha256: b6bbd2a2d8504cbb23816d626b563b6d3f4b8973ade9737be7ce184d1ed01795

Contents?: true

Size: 1.43 KB

Versions: 54

Compression:

Stored size: 1.43 KB

Contents

var root, storable;

root = typeof exports !== "undefined" && exports !== null ? exports : window;

storable = require('indemma/lib/record/storable');

describe('storable', function() {
  it('should set the storable key', function() {
    return model.should.have.property('storable', true);
  });
  beforeEach(function() {
    return this.storage = storable();
  });
  return describe("#store", function() {
    describe("write", function() {
      it("should write object on deep storage");
      it("should write object on storage", function() {
        var data;

        data = {
          name: 'Arthur Dent'
        };
        this.storage.store('1', data);
        this.storage.writes.should.be.eq(1);
        return this.storage.database['1'].should.be.eq(data);
      });
      return it("should mark an object as sustained", function() {
        var data;

        data = {
          name: 'Arthur Dent'
        };
        this.storage.store('1', data);
        return data.should.have.property('sustained', true);
      });
    });
    return describe("read", function() {
      var data;

      data = null;
      beforeEach(function() {
        data = {
          name: 'Arthur Dent'
        };
        return this.storage.store('1', data);
      });
      it("should save object on storage", function() {
        return this.storage.store('1').should.be.eq(data);
      });
      return it("should unmark an object as sustained");
    });
  });
});

Version data entries

54 entries across 54 versions & 1 rubygems

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