Skip to content

Commit 21d973a

Browse files
committed
Fix test
1 parent f9a7d34 commit 21d973a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/RelationsTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,9 @@ public function testEmbedsManyUpdatingEventReturnsFalse()
521521
public function testEmbedsManyDeletingEventReturnsFalse()
522522
{
523523
$user = User::create(array('name' => 'John Doe'));
524-
$address = new Address(array('city' => 'New York'));
525-
$user->addresses()->save($address);
524+
$user->addresses()->save(new Address(array('city' => 'New York')));
525+
526+
$address = $user->addresses->first();
526527

527528
$address->setEventDispatcher($events = Mockery::mock('Illuminate\Events\Dispatcher'));
528529
$events->shouldReceive('until')->once()->with('eloquent.deleting: '.get_class($address), Mockery::mustBe($address))->andReturn(false);

0 commit comments

Comments
 (0)