Satisfy Pint on the two new guard-boundary tests
Import the classes instead of referencing them fully-qualified, and use single quotes where no interpolation or escaping is needed.feat/operator-identity
parent
055c6228f4
commit
9c851b28b4
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Livewire\Admin\Secrets;
|
||||
use App\Livewire\Settings;
|
||||
use App\Models\Operator;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
|
@ -34,7 +35,7 @@ it('rejects a password that belongs to a portal user with the same address', fun
|
|||
it('still confirms a portal password on the web guard', function () {
|
||||
$user = User::factory()->create(['password' => 'kunden-passwort']);
|
||||
|
||||
Livewire::actingAs($user)->test(App\Livewire\Settings::class)
|
||||
Livewire::actingAs($user)->test(Settings::class)
|
||||
->set('confirmablePassword', 'kunden-passwort')
|
||||
->call('confirmPassword')
|
||||
->assertHasNoErrors();
|
||||
|
|
@ -112,7 +113,7 @@ it("does not let a portal customer's password confirmation satisfy the console's
|
|||
// App\Livewire\Settings::confirmationGuard() defaults to 'web', resolved
|
||||
// explicitly by guard — no actingAs needed to reach the right account,
|
||||
// the login() call above already put it in the session.
|
||||
Livewire::test(App\Livewire\Settings::class)
|
||||
Livewire::test(Settings::class)
|
||||
->set('confirmablePassword', 'kunden-passwort')
|
||||
->call('confirmPassword')
|
||||
->assertHasNoErrors();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
* silently signed an operator elsewhere in that same browser out of the
|
||||
* console too.
|
||||
*/
|
||||
it("suspending a portal customer does not sign an operator out of a console session sharing the same browser", function () {
|
||||
it('suspending a portal customer does not sign an operator out of a console session sharing the same browser', function () {
|
||||
$operator = Operator::factory()->role('Owner')->create();
|
||||
$user = User::factory()->create();
|
||||
Customer::factory()->create(['email' => $user->email, 'user_id' => $user->id, 'status' => 'suspended']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue