Apply Pint lint fixes to session test files

pull/7147/head
Your Name 2 weeks ago
parent 46fb9613e3
commit eb9bd11303

@ -2,6 +2,7 @@
use App\Models\User;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Laravel\Passport\ClientRepository;
uses(LazilyRefreshDatabase::class);
@ -19,7 +20,7 @@ uses(LazilyRefreshDatabase::class);
*/
beforeEach(function () {
$this->withoutMiddleware(\Illuminate\Routing\Middleware\ThrottleRequests::class);
$this->withoutMiddleware(ThrottleRequests::class);
app(ClientRepository::class)->createPersonalAccessGrantClient(
'Test Personal Access Client',
config('auth.guards.api.provider')

@ -1,5 +1,6 @@
<?php
use App\Jobs\SharePipeline\SharePipeline;
use App\Models\Status;
use App\Models\User;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
@ -70,5 +71,5 @@ it('does not re-dispatch SharePipeline for an already-existing share', function
$this->postJson("/api/v1/statuses/{$status->id}/reblog")->assertOk();
// SharePipeline dispatched exactly once (only for the newly-created share).
Bus::assertDispatchedTimes(\App\Jobs\SharePipeline\SharePipeline::class, 1);
Bus::assertDispatchedTimes(SharePipeline::class, 1);
});

@ -1,6 +1,7 @@
<?php
use App\Models\Hashtag;
use App\Models\Profile;
use App\Models\User;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
@ -40,7 +41,7 @@ it('returns 422 instead of 500 when the profile is soft-deleted', function () {
// while leaving the still-authenticated session intact. Unset the cached
// relation so the controller re-queries and sees null, matching what a
// fresh request resolves after the pipeline runs in another request.
App\Models\Profile::whereUserId($user->id)->delete();
Profile::whereUserId($user->id)->delete();
$user->unsetRelation('profile');
$this->actingAs($user)

@ -5,6 +5,7 @@ use App\Models\ImportJob;
use App\Models\Profile;
use App\Models\User;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
use Illuminate\Support\Str;
uses(LazilyRefreshDatabase::class);
@ -29,7 +30,7 @@ it('drops the import job when the profile has been soft-deleted', function () {
$job = new ImportJob;
$job->profile_id = $user->profile_id;
$job->service = 'instagram';
$job->uuid = (string) \Illuminate\Support\Str::uuid();
$job->uuid = (string) Str::uuid();
$job->stage = 0;
$job->save();
@ -50,7 +51,7 @@ it('drops the import job when the job no longer exists', function () {
$job = new ImportJob;
$job->profile_id = $user->profile_id;
$job->service = 'instagram';
$job->uuid = (string) \Illuminate\Support\Str::uuid();
$job->uuid = (string) Str::uuid();
$job->stage = 0;
$job->save();

Loading…
Cancel
Save