forked from sequelize/sequelize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nuno Sousa
committed
Jun 25, 2014
1 parent
cc99c74
commit 8198aa0
Showing
8 changed files
with
136 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,16 +295,16 @@ if (dialect.match(/^postgres/)) { | |
.error(console.log) | ||
}) | ||
|
||
it("should update hstore correctly and return affected rows", function(done) { | ||
it("should update hstore correctly and return the affected rows", function(done) { | ||
var self = this | ||
|
||
this.User | ||
.create({ username: 'user', email: ['[email protected]'], settings: { created: { test: '"value"' }}}) | ||
.success(function(oldUser) { | ||
// Update the user and check that the returned object's fields have been parsed by the hstore library | ||
self.User.update({settings: {should: 'update', to: 'this', first: 'place'}}, oldUser.identifiers).spread(function(newUsers) { | ||
expect(newUsers).to.have.length(1); | ||
expect(newUsers[0].settings).to.deep.equal({should: 'update', to: 'this', first: 'place'}) | ||
self.User.update({settings: {should: 'update', to: 'this', first: 'place'}}, oldUser.identifiers, { returning: true }).spread(function(count, users) { | ||
expect(count).to.equal(1); | ||
expect(users[0].settings).to.deep.equal({should: 'update', to: 'this', first: 'place'}) | ||
done() | ||
}) | ||
}) | ||
|
Oops, something went wrong.