From c2f0ea50703e2d10edb1b7f7879ee706f8726f71 Mon Sep 17 00:00:00 2001 From: Spitfire Date: Fri, 16 Feb 2024 09:35:24 -0600 Subject: [PATCH] Fixed tests --- phpunit.xml | 1 - tests/Feature/Entities/EntityTest.php | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 7a9fd90d97..3bc069f8a8 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -26,6 +26,5 @@ - diff --git a/tests/Feature/Entities/EntityTest.php b/tests/Feature/Entities/EntityTest.php index ddafcd1a03..69ef403d55 100644 --- a/tests/Feature/Entities/EntityTest.php +++ b/tests/Feature/Entities/EntityTest.php @@ -40,23 +40,16 @@ ->assertStatus(200) ; -it('POSTS a new character with a mention and checks that a new entity is created') - ->asUser() - ->withCampaign() - ->postJson('/api/1.0/campaigns/1/characters', [ +it('POSTS a new character with a mention and checks that a new entity is created', function () { + $this->asUser() + ->withCampaign(); + + $response = $this->postJson('/api/1.0/campaigns/1/characters', [ 'name' => fake()->name(), 'entry' => '[new:item|Mega sword]', - ]) - ->assertStatus(201) - ->assertJsonStructure([ - 'data' => [ - 'id', - 'entity_id', - ] - ]) - ->assertJsonFragment(['entry_parsed' => 'Mega sword']) + ]); + $this->assertStringStartsWith('