Created
November 3, 2014 15:42
-
-
Save sly7-7/2bf4ae9d8e5ffa5fe7f0 to your computer and use it in GitHub Desktop.
failing test for 2447
This file contains hidden or 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
test("When deleting a record that has a belongsTo relationship, the record is removed from the inverse but still has access to its own relationship - async", function () { | |
User.reopen({ | |
observesBestFriend: Ember.observer('bestFriend', function () { | |
this.get('bestFriend'); | |
}) | |
}); | |
var stanleysFriend = store.push('user', {id:2, name: "Stanley's friend"}); | |
var stanley = store.push('user', {id:1, name: 'Stanley', bestFriend:2}); | |
stanley.deleteRecord(); | |
stanleysFriend.get('bestFriend').then(async(function(fetchedUser) { | |
equal(fetchedUser, null, 'Stanley got removed'); | |
})); | |
stanley.get('bestFriend').then(async(function(fetchedUser) { | |
equal(fetchedUser, stanleysFriend, 'Stanleys friend did not get removed'); | |
})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment