-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
show test failing with hasChangedAttributes #383
show test failing with hasChangedAttributes #383
Conversation
@GuillaumeCisco Apologies I was on vacation for the last week. I wonder if you could put your potential dummy fix in this PR too and maybe update the description? If anything to generate discussion about how to properly fix it. I don't know a whole lot about the internals of RecordData but we can ping the relevant folks to get them to look |
@@ -140,20 +140,25 @@ module('unit - `MF.fragmentArray` property', function(hooks) { | |||
region: 'Crownlands', | |||
country: 'Westeros' | |||
}); | |||
assert.deepEqual(person.changedAttributes().addresses, undefined, 'a frehsly pushed object has no changes'); | |||
assert.deepEqual(person.changedAttributes().addresses, undefined, 'a freshly pushed object has no changes'); | |||
assert.ok(!person._internalModel.hasChangedAttributes(), 'a freshly pushed object has no changed attributes'); |
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.
Does person.hasDirtyAttributes
give us the same results as person._internalModel.hasChangedAttributes()
?
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 don't even know. I think it should by reading the documentation
But hasChangedAttributes
is an internal method, and this is the one we need to update for fixing the bug in my case.
As hasChangedAttributes
will be called as I developed it in earlier post.
The PR with the fix can be found on my fork here: GuillaumeCisco#1 |
@GuillaumeCisco I think we can close this PR. It appears that the fix in #381 makes the test you created here pass. They also include a fix with their test. |
The fix from #381 has been released in v5.0.0-beta.1 |
No description provided.