Fix Laravel Pint formatting
This commit is contained in:
@@ -97,7 +97,7 @@ class PreferencesControllerTest extends TestCase
|
||||
$user = $this->createUser('teacher');
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$response = $this->deleteJson('/api/v1/preferences/' . $user->id);
|
||||
$response = $this->deleteJson('/api/v1/preferences/'.$user->id);
|
||||
|
||||
$response->assertForbidden();
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class PreferencesControllerTest extends TestCase
|
||||
'notification_sms' => 1,
|
||||
]);
|
||||
|
||||
$response = $this->deleteJson('/api/v1/preferences/' . $admin->id);
|
||||
$response = $this->deleteJson('/api/v1/preferences/'.$admin->id);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertDatabaseMissing('user_preferences', [
|
||||
@@ -146,7 +146,7 @@ class PreferencesControllerTest extends TestCase
|
||||
'id' => $id,
|
||||
'firstname' => 'Test',
|
||||
'lastname' => 'User',
|
||||
'email' => $roleName . $id . '@example.com',
|
||||
'email' => $roleName.$id.'@example.com',
|
||||
'cellphone' => '5555555555',
|
||||
'address_street' => '123 Main',
|
||||
'city' => 'City',
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
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;
|
||||
@@ -50,7 +51,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);
|
||||
@@ -88,7 +89,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',
|
||||
]);
|
||||
|
||||
@@ -107,7 +108,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);
|
||||
@@ -134,8 +135,9 @@ class SchoolCalendarControllerTest extends TestCase
|
||||
$user = $this->seedUser();
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->app->bind(\App\Services\Settings\SchoolCalendar\SchoolCalendarMutationService::class, function () {
|
||||
return new class {
|
||||
$this->app->bind(SchoolCalendarMutationService::class, function () {
|
||||
return new class
|
||||
{
|
||||
public function create(array $payload, array $targets = []): array
|
||||
{
|
||||
throw new \RuntimeException('fail');
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Tests\Feature\Api\V1\Settings;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -80,7 +79,7 @@ class SettingsControllerTest extends TestCase
|
||||
$user = User::query()->create([
|
||||
'firstname' => 'Test',
|
||||
'lastname' => 'User',
|
||||
'email' => $roleName . '@example.com',
|
||||
'email' => $roleName.'@example.com',
|
||||
'cellphone' => '5555555555',
|
||||
'address_street' => '123 Main',
|
||||
'city' => 'City',
|
||||
|
||||
Reference in New Issue
Block a user