From 0763bfa2306a9c75901baebe057ee6549db9e94f Mon Sep 17 00:00:00 2001 From: Dmitry Ivanov Date: Thu, 16 Mar 2017 14:27:06 +0200 Subject: [PATCH] ITT: `assertEloquentBelongsTo` minor fixes. --- src/Asserts/EloquentAsserts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Asserts/EloquentAsserts.php b/src/Asserts/EloquentAsserts.php index 80ad7c7..285c8e7 100644 --- a/src/Asserts/EloquentAsserts.php +++ b/src/Asserts/EloquentAsserts.php @@ -98,6 +98,6 @@ protected function assertEloquentBelongsTo($class, $relation) $parent = factory(get_class($parentModel))->create(); $child = factory($class)->create([$childForeignKey => $parent->{$parentKey}]); - $this->assertEquals($parent->toArray(), $child->{$relation}->toArray()); + $this->assertEquals($parent->fresh()->toArray(), $child->{$relation}->toArray()); } }