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

Commit 3ce25c28 by Ruben Bridgewater

Fix old tests - do not swallow errors

The tests should always return the error instead of logging it.
1 parent bca4fe1e
...@@ -488,9 +488,6 @@ if (dialect.match(/^postgres/)) { ...@@ -488,9 +488,6 @@ if (dialect.match(/^postgres/)) {
.create({ username: 'user', email: ['foo@bar.com', 'bar@baz.com'] }) .create({ username: 'user', email: ['foo@bar.com', 'bar@baz.com'] })
.then(function(oldUser) { .then(function(oldUser) {
expect(oldUser.email).to.contain.members(['foo@bar.com', 'bar@baz.com']); expect(oldUser.email).to.contain.members(['foo@bar.com', 'bar@baz.com']);
})
.catch(function(err) {
console.log(err);
}); });
}); });
...@@ -611,8 +608,7 @@ if (dialect.match(/^postgres/)) { ...@@ -611,8 +608,7 @@ if (dialect.match(/^postgres/)) {
.then(function(users) { .then(function(users) {
expect(users[0].settings).to.deep.equal({ test: '"value"' }); expect(users[0].settings).to.deep.equal({ test: '"value"' });
expect(users[1].settings).to.deep.equal({ another: '"example"' }); expect(users[1].settings).to.deep.equal({ another: '"example"' });
}) });
.catch(console.log);
}); });
it('should read hstore correctly from included models as well', function() { it('should read hstore correctly from included models as well', function() {
...@@ -830,8 +826,7 @@ if (dialect.match(/^postgres/)) { ...@@ -830,8 +826,7 @@ if (dialect.match(/^postgres/)) {
expect(users[1].course_period[0]).to.equalTime(periods[1][0]); // lower bound expect(users[1].course_period[0]).to.equalTime(periods[1][0]); // lower bound
expect(users[1].course_period[1]).to.equalTime(periods[1][1]); // upper bound expect(users[1].course_period[1]).to.equalTime(periods[1][1]); // upper bound
expect(users[1].course_period.inclusive).to.deep.equal([false, false]); // not inclusive expect(users[1].course_period.inclusive).to.deep.equal([false, false]); // not inclusive
}) });
.catch(console.log);
}); });
it('should read range correctly from included models as well', function () { it('should read range correctly from included models as well', function () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!