Skip to content

Commit

Permalink
Fix testHasManyNewEntitySaveRelation()
Browse files Browse the repository at this point in the history
  • Loading branch information
kitchenu committed Aug 1, 2017
1 parent 60d208e commit 3a51dcd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/CRUD.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ public function testHasManyNewEntitySaveRelation()
$post->relation('comments', new \Spot\Entity\Collection($comments));
$mapper->save($post, ['relations' => true]);
$this->assertEquals($commentMapper->get($removedComment->primaryKey()), false);
$this->assertEquals($commentMapper->where(['post_id' => $post->id])->count(), 1);

//Test all comments removed when relation set to false
$post->relation('comments', false);
Expand Down

0 comments on commit 3a51dcd

Please sign in to comment.