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

Commit ee509090 by Ruben Bridgewater

Fix deprecation message in tests

1 parent 2a7c7c73
......@@ -55,8 +55,8 @@ if (dialect.match(/^postgres/)) {
this.users = null;
this.tasks = null;
this.User.hasMany(this.Task, {as: 'Tasks', through: 'usertasks'});
this.Task.hasMany(this.User, {as: 'Users', through: 'usertasks'});
this.User.belongsToMany(this.Task, {as: 'Tasks', through: 'usertasks'});
this.Task.belongsToMany(this.User, {as: 'Users', through: 'usertasks'});
var users = []
, tasks = [];
......
......@@ -1707,7 +1707,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
return User.sync().then(function() {
var user = User.build({ username: 'foo' });
expect(user.values).to.deep.equal({ username: 'foo', id: null });
expect(user.get({ plain: true })).to.deep.equal({ username: 'foo', id: null });
});
});
});
......
......@@ -397,7 +397,7 @@ describe(Support.getTestDialectTeaser('Sequelize'), function() {
if (Support.getTestDialect() === 'postgres') {
it('replaces named parameters with the passed object and ignores casts', function() {
return expect(this.sequelize.query('select :one as foo, :two as bar, \'1000\'::integer as baz', null, { raw: true }, { one: 1, two: 2 }).get(0))
return expect(this.sequelize.query('select :one as foo, :two as bar, \'1000\'::integer as baz', null, { raw: true, replacements: { one: 1, two: 2 } }).get(0))
.to.eventually.deep.equal([{ foo: 1, bar: 2, baz: 1000 }]);
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!