From 0349e05e3991e141035200d6f4e38665104f0651 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Fri, 22 Dec 2023 10:49:17 +0300 Subject: [PATCH] added edit form test recipe --- tests/Feature/Recipe/EditFormTest.php | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/Feature/Recipe/EditFormTest.php diff --git a/tests/Feature/Recipe/EditFormTest.php b/tests/Feature/Recipe/EditFormTest.php new file mode 100644 index 0000000..3975487 --- /dev/null +++ b/tests/Feature/Recipe/EditFormTest.php @@ -0,0 +1,43 @@ +user = User::factory()->create(['is_consultant' => true]); + + $this->recipe = Recipe::inRandomOrder()->first(); + + $this->refreshApplicationWithLocale('en'); + } + + public function testShowFormEditRecipe(): void + { + $response = $this + ->actingAs($this->user) + ->get(route('recipe.edit', ['recipe' => $this->recipe->id])); + + $response->assertSuccessful(); + } + +}