New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change(model): setDataValue shouldn't set attribute as changed when u… #9347
Conversation
@sushantdhiman, can you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New test should be using .set
not .setDataValue
@sushantdhiman, but we are checking functionality of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see there is already a test for .set
primitive null case.
Just move this test under new describe and rebase your branch with master. Then it should be good to go
test/unit/instance/changed.test.js
Outdated
@@ -47,6 +47,21 @@ describe(Support.getTestDialectTeaser('Instance'), () => { | |||
expect(user.changed('meta')).to.equal(false); | |||
}); | |||
|
|||
it('should return falsy for unchanged primitive via setDataValue', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this one new test under describe('setDataValue')
, as it's testing setDataValue
…from null to null v3 port of sequelize#9347
…pdated from null to null #5004
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change