Skip to content

Commit 0763bfa

Browse files
committed
ITT: assertEloquentBelongsTo minor fixes.
1 parent a311e25 commit 0763bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Asserts/EloquentAsserts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ protected function assertEloquentBelongsTo($class, $relation)
9898
$parent = factory(get_class($parentModel))->create();
9999
$child = factory($class)->create([$childForeignKey => $parent->{$parentKey}]);
100100

101-
$this->assertEquals($parent->toArray(), $child->{$relation}->toArray());
101+
$this->assertEquals($parent->fresh()->toArray(), $child->{$relation}->toArray());
102102
}
103103
}

0 commit comments

Comments
 (0)