This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
In model unit tests this.subject().store
and this.store()
are different
#42
Labels
I first posted this issue on the ember.js repository (emberjs/ember.js#10367 (comment)) but was told that it's almost certainly a bug in ember-cli-qunit.
See this discussion on StackOverflow: http://stackoverflow.com/a/25945287/1269194. In a model unit test, the
Store
objects returned bythis.subject().store
andthis.store()
are not the same, resulting in an error when trying to assign a model to a relationship.For instance, say you have
Parent
andChild
as follows:and in a unit test for
Parent
you dothen you get an error
Error: Assertion Failed: You can only add a 'child' record to this relationship
.I encountered this bug when upgrading our non-ember-cli project to ember-cli 0.1.11.
The text was updated successfully, but these errors were encountered: