add tests batch 20
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace Tests\Feature\Api\V1\Settings;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\Settings\SchoolCalendar\SchoolCalendarMutationService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
@@ -51,7 +50,7 @@ class SchoolCalendarControllerTest extends TestCase
|
||||
$eventId = $this->seedEvent();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->getJson('/api/v1/settings/school-calendar/events/'.$eventId);
|
||||
$response = $this->getJson('/api/v1/settings/school-calendar/events/' . $eventId);
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertJsonPath('status', true);
|
||||
@@ -89,7 +88,7 @@ class SchoolCalendarControllerTest extends TestCase
|
||||
$eventId = $this->seedEvent();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->patchJson('/api/v1/settings/school-calendar/events/'.$eventId, [
|
||||
$response = $this->patchJson('/api/v1/settings/school-calendar/events/' . $eventId, [
|
||||
'title' => 'Updated Event',
|
||||
]);
|
||||
|
||||
@@ -108,7 +107,7 @@ class SchoolCalendarControllerTest extends TestCase
|
||||
$eventId = $this->seedEvent();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->deleteJson('/api/v1/settings/school-calendar/events/'.$eventId);
|
||||
$response = $this->deleteJson('/api/v1/settings/school-calendar/events/' . $eventId);
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertJsonPath('status', true);
|
||||
@@ -135,9 +134,8 @@ class SchoolCalendarControllerTest extends TestCase
|
||||
$user = $this->seedUser();
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->app->bind(SchoolCalendarMutationService::class, function () {
|
||||
return new class
|
||||
{
|
||||
$this->app->bind(\App\Services\Settings\SchoolCalendar\SchoolCalendarMutationService::class, function () {
|
||||
return new class {
|
||||
public function create(array $payload, array $targets = []): array
|
||||
{
|
||||
throw new \RuntimeException('fail');
|
||||
|
||||
Reference in New Issue
Block a user