Sha256: d4e719488e729d719845a02de2fa5480d5daf2bcc0e0ba739d88358701fc7ce1
Contents?: true
Size: 744 Bytes
Versions: 2
Compression:
Stored size: 744 Bytes
Contents
describe("Model", function(){ var Asset; beforeEach(function(){ Asset = Model.setup(); Asset.attributes = ["name"]; }); it("can create records", function(){ var asset = Asset.create({name: "test.pdf"}); expect(Asset.first()).toEqual(asset); }); it("can update records", function(){ var asset = Asset.create({name: "test.pdf"}); expect(Asset.first().name).toEqual("test.pdf"); asset.name = "wem.pdf"; asset.save(); expect(Asset.first().name).toEqual("wem.pdf"); }); it("can destroy records", function(){ var asset = Asset.create({name: "test.pdf"}); expect(Asset.first()).toEqual(asset); asset.destroy(); expect(Asset.first()).toBeFalsy(); }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ichabod-0.0.2 | examples/jasmine/model.spec.js |
ichabod-0.0.1 | examples/jasmine/model.spec.js |