Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Expand "Deep reverse relations" test with one more twist.
  • Loading branch information
PaulUithol committed Mar 6, 2013
1 parent fb837d3 commit 3d04b7d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/tests.js
Expand Up @@ -3155,7 +3155,10 @@ $(document).ready(function() {
{
id: 2,
children: [
{ id: 3 }
{
id: 3,
children: [ 1 ]
}
]
}
]
Expand All @@ -3175,6 +3178,9 @@ $(document).ready(function() {
ok( grandchild, '`grandchild` can be retrieved from `child`' );

ok( grandchild.get( 'parent' ), 'reverse relation from `grandchild` to `child` works');

ok( grandchild.get( 'children' ).first() === parent, 'reverse relation from `grandchild` to `child` works');
ok( parent.get( 'parent' ) === grandchild, 'circular reference from `grandchild` to `parent` works' );
});


Expand Down

0 comments on commit 3d04b7d

Please sign in to comment.