From 9084b540b3c504e33a87944579a80a99015b32ec Mon Sep 17 00:00:00 2001 From: Andy Newhouse Date: Thu, 25 Apr 2024 14:25:00 -0500 Subject: [PATCH] Change syntax --- tests/Feature/ExampleTest.php | 2 +- tests/Feature/TrickTest.php | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 8b5843f..1e2a000 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -1,6 +1,6 @@ get('/'); $response->assertStatus(200); diff --git a/tests/Feature/TrickTest.php b/tests/Feature/TrickTest.php index f3019bc..eede142 100644 --- a/tests/Feature/TrickTest.php +++ b/tests/Feature/TrickTest.php @@ -4,7 +4,7 @@ use App\Models\User; // Index -it('can view tricks on homepage', function () { +test('can view tricks on homepage', function () { Trick::factory()->create(['name' => 'How to make a trick']); $this->get(route('tricks.index')) @@ -13,20 +13,20 @@ }); // Create -it('can view create trick page', function () { +test('can view create trick page', function () { $this->actingAs(User::factory()->create()) ->get(route('tricks.create')) ->assertStatus(200) ->assertSee('Create Trick'); }); -it('cannot view create trick page as guest', function () { +test('cannot view create trick page as guest', function () { $this->get(route('tricks.create')) ->assertStatus(302); }); // Store -it('can store trick', function () { +test('can store trick', function () { $this->actingAs(User::factory()->create()) ->post(route('tricks.store'), [ 'name' => 'How to make a Trick', @@ -43,7 +43,7 @@ ]); }); -it('cannot store invalid trick', function () { +test('cannot store invalid trick', function () { $this->actingAs(User::factory()->create()) ->post(route('tricks.store'), [ 'name' => 'how', @@ -57,7 +57,7 @@ // Show // Edit -it('can view edit trick page', function () { +test('can view edit trick page', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create(); @@ -67,7 +67,7 @@ ->assertSee('Edit Trick'); }); -it('cannot view edit trick page as guest', function () { +test('cannot view edit trick page as guest', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create(); @@ -75,7 +75,7 @@ ->assertStatus(302); }); -it('cannot view edit trick page if not yours', function () { +test('cannot view edit trick page if not yours', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create(); @@ -85,7 +85,7 @@ }); // Update -it('can update trick', function () { +test('can update trick', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create([ 'name' => 'How to make a Trick', @@ -109,7 +109,7 @@ }); }); -it('cannot update invalid trick', function () { +test('cannot update invalid trick', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create([ 'name' => 'How to make a Trick', @@ -135,7 +135,7 @@ }); }); -it('cannot update trick page if not yours', function () { +test('cannot update trick page if not yours', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create(); @@ -149,7 +149,7 @@ }); // Delete -it('can delete trick', function () { +test('can delete trick', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create([ 'name' => 'How to make a Trick', @@ -168,7 +168,7 @@ ]); }); -it('cannot delete trick page if not yours', function () { +test('cannot delete trick page if not yours', function () { $user = User::factory()->create(); $trick = Trick::factory()->for($user)->create();