Sha256: 514a44b22cf61e20ec6ff0a08588ac912dadc1c7e0c443cd3e30e72a830bb6f1
Contents?: true
Size: 761 Bytes
Versions: 3
Compression:
Stored size: 761 Bytes
Contents
describe "Skr.Models.Customer", -> beforeEach -> Lanes.Test.ModelSaver.setUser('admin') it "sends failure messages when code isn't set", (done) -> model = new Skr.Models.Customer() Lanes.Test.ModelSaver.perform(model, done).then (save) -> expect(model.errors?.code).toContain("blank") it "saves when fields are set", (done) -> model = new Skr.Models.Customer( code: "SPECTEST", name: "A Spec Test Customer" terms: {code: 'SPECTESTER'} billing_address: { name: "Billing Address" } shipping_address: { name: "Shipping Address" } ) Lanes.Test.ModelSaver.perform(model, done).then (save) -> expect(model.errors).toBeUndefined()
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stockor-0.4.0 | spec/skr/models/CustomerSpec.coffee |
stockor-0.3.0 | spec/skr/models/CustomerSpec.coffee |
stockor-0.2 | spec/skr/models/CustomerSpec.coffee |