From 5b5011ff22357c7827a23d10c2575a3fd1313d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Wis=CC=81niewski?= Date: Thu, 5 Dec 2024 11:51:23 +0100 Subject: [PATCH] fix tests --- tests/Feature/Products/ProductCreateTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Products/ProductCreateTest.php b/tests/Feature/Products/ProductCreateTest.php index ffc4843b..1b59fdc3 100644 --- a/tests/Feature/Products/ProductCreateTest.php +++ b/tests/Feature/Products/ProductCreateTest.php @@ -295,6 +295,7 @@ public function testCreateWithManufacturer(string $user): void 'translations' => [ $this->lang => [ 'name' => 'Test', + 'safety_information' => 'Safety', ], ], 'published' => [$this->lang], @@ -303,7 +304,6 @@ public function testCreateWithManufacturer(string $user): void 'public' => true, 'shipping_digital' => false, 'manufacturer_id' => $manufacturer->getKey(), - 'safety_information' => 'Safety', ]) ->assertCreated() ->assertJsonFragment([ @@ -666,7 +666,12 @@ public function testUpdateManufacturer(string $user): void ->actingAs($this->{$user}) ->json('PATCH', "/products/id:{$product->getKey()}", [ 'manufacturer_id' => $manufacturer->getKey(), - 'safety_information' => 'Safety', + 'translations' => [ + $this->lang => [ + 'name' => $product->name, + 'safety_information' => 'Safety', + ] + ], ]) ->assertOk() ->assertJsonFragment([