不要怂,就是干,撸起袖子干!

Updated broken test.

1 parent b990379f
Showing with 3 additions and 10 deletions
...@@ -8,7 +8,6 @@ var chai = require('chai') ...@@ -8,7 +8,6 @@ var chai = require('chai')
, dialect = Support.getTestDialect() , dialect = Support.getTestDialect()
, config = require(__dirname + '/../config/config') , config = require(__dirname + '/../config/config')
, sinon = require('sinon') , sinon = require('sinon')
, sinonChai = require('sinon-chai')
, datetime = require('chai-datetime') , datetime = require('chai-datetime')
, uuid = require('node-uuid') , uuid = require('node-uuid')
, _ = require('lodash') , _ = require('lodash')
...@@ -16,7 +15,6 @@ var chai = require('chai') ...@@ -16,7 +15,6 @@ var chai = require('chai')
chai.should(); chai.should();
chai.use(datetime); chai.use(datetime);
chai.use(sinonChai);
chai.config.includeStack = true; chai.config.includeStack = true;
describe(Support.getTestDialectTeaser('Instance'), function() { describe(Support.getTestDialectTeaser('Instance'), function() {
...@@ -824,12 +822,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() { ...@@ -824,12 +822,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
}); });
it('should throw error when given value of incorrect type', function() { it('should throw error when given value of incorrect type', function() {
function didApplyValue(cb) { var callCount = 0;
cb();
throw new Error("Value incorrectly applied!!!");
}
var spy = sinon.spy();
return this.User.build({ return this.User.build({
username: 'a user', username: 'a user',
...@@ -837,10 +830,10 @@ describe(Support.getTestDialectTeaser('Instance'), function() { ...@@ -837,10 +830,10 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
}) })
.save() .save()
.then(function () { .then(function () {
didApplyValue(spy); callCount += 1;
}) })
.catch(function(err) { .catch(function(err) {
spy.should.have.callCount(0); expect(callCount).to.equal(0);
expect(err).to.exist; expect(err).to.exist;
expect(err.message).to.exist; expect(err.message).to.exist;
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!