diff --git a/api/tests/Feature/ProductsTest.php b/api/tests/Feature/ProductsTest.php new file mode 100644 index 0000000..2703605 --- /dev/null +++ b/api/tests/Feature/ProductsTest.php @@ -0,0 +1,19 @@ +get('http://localhost:8000/api/product'); + + $response->assertStatus(200); + $response->assertJsonStructure(['success', 'data' => ['products']]); + } +} diff --git a/api/tests/Feature/RecipesTest.php b/api/tests/Feature/RecipesTest.php new file mode 100644 index 0000000..8c995a2 --- /dev/null +++ b/api/tests/Feature/RecipesTest.php @@ -0,0 +1,19 @@ +get('http://localhost:8000/api/recipe'); + + $response->assertStatus(200); + $response->assertJsonStructure(['success', 'data' => ['recipes']]); + } +} diff --git a/api/tests/Feature/UsersTest.php b/api/tests/Feature/UsersTest.php index 5101fe7..809cc9f 100644 --- a/api/tests/Feature/UsersTest.php +++ b/api/tests/Feature/UsersTest.php @@ -9,9 +9,9 @@ class UsersTest extends TestCase { use RefreshDatabase; - private array $loginData = ['email' => 'artur.nowakowski@gmail.com', 'password' => 'test123']; + protected $loginData = ['email' => 'artur.nowakowski@gmail.com', 'password' => 'test123']; - public function getToken() + protected function getToken() { $response = $this->post('http://localhost:8000/api/user/login', $this->loginData)->decodeResponseJson();