Skip to content

Commit

Permalink
fix spec to accept array
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosommi committed Aug 3, 2015
1 parent 8eff421 commit 87a065f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions es5/spec/model.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2217,14 +2217,14 @@ describe("Model(attributes, options)", function () {
});

it("should call back with an error", function () {
user.save(function (error) {
error.should.be.instanceOf(Error);
user.save(function (errors) {
errors[0].should.be.instanceOf(Error);
});
});

it("should inform the user that the model is invalid", function () {
user.save(function (error) {
error.message.should.eql("photos must be present on User");
user.save(function (errors) {
errors[0].message.should.eql("photos must be present on User");
});
});
});
Expand Down
8 changes: 4 additions & 4 deletions es6/spec/model.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2060,14 +2060,14 @@ describe("Model(attributes, options)", () => {
});

it("should call back with an error", () => {
user.save((error) => {
error.should.be.instanceOf(Error);
user.save((errors) => {
errors[0].should.be.instanceOf(Error);
});
});

it("should inform the user that the model is invalid", () => {
user.save((error) => {
error.message.should.eql("photos must be present on User");
user.save((errors) => {
errors[0].message.should.eql("photos must be present on User");
});
});
});
Expand Down

0 comments on commit 87a065f

Please sign in to comment.