From ee67911afb6102e979d570339adab2f57f7c88d0 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 6 Oct 2020 22:32:07 +1100 Subject: [PATCH] Fixes for tests --- tests/Feature/ProductTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Feature/ProductTest.php b/tests/Feature/ProductTest.php index 6002efdd03eb..8a45791223fd 100644 --- a/tests/Feature/ProductTest.php +++ b/tests/Feature/ProductTest.php @@ -86,7 +86,10 @@ class ProductTest extends TestCase ) ->assertStatus(200); - $product = Product::all()->first(); + + $arr = $response->json(); + $product = Product::find($this->decodePrimaryKey($arr['data']['id'])); + $product_update = [ 'notes' => 'CHANGE',