Skip to content

Commit

Permalink
Adding an extra test for #175
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Apr 8, 2014
1 parent f3f1f8e commit 9ca3f15
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/RelationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,15 @@ public function testEmbedsManyDuplicate()
$user->addresses()->save($address);
$user->addresses()->save($address);
$this->assertEquals(1, $user->addresses->count());
$this->assertEquals(array('London'), $user->addresses->lists('city'));

$freshUser = User::find($user->id);
$this->assertEquals(1, $freshUser->addresses->count());
$user = User::find($user->id);
$this->assertEquals(1, $user->addresses->count());

$address->city = 'Paris';
$user->addresses()->save($address);
$this->assertEquals(1, $user->addresses->count());
$this->assertEquals(array('Paris'), $user->addresses->lists('city'));
}

public function testEmbedsManyCreate()
Expand Down

0 comments on commit 9ca3f15

Please sign in to comment.