Deploy Ladill Woo Manager / deploy (push) Successful in 34s
Logout now lands on the branded sign-out screen with Woo-specific copy instead of the minimal placeholder card. Co-authored-by: Cursor <cursoragent@cursor.com>
42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
||
|
||
namespace Tests\Feature;
|
||
|
||
use App\Models\User;
|
||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||
use Tests\TestCase;
|
||
|
||
class WooSignedOutTest extends TestCase
|
||
{
|
||
use RefreshDatabase;
|
||
|
||
public function test_guest_sees_standard_signed_out_page(): void
|
||
{
|
||
$this->get(route('woo.signed-out'))
|
||
->assertOk()
|
||
->assertSee('You’re signed out', false)
|
||
->assertSee('Ladill Woo Manager', false)
|
||
->assertSee('manage orders, products, and stores', false)
|
||
->assertSee(route('sso.connect'), false)
|
||
->assertSee('Go to ladill.com', false);
|
||
}
|
||
|
||
public function test_authenticated_user_is_redirected_from_signed_out_page(): void
|
||
{
|
||
$this->actingAs(User::factory()->create())
|
||
->get(route('woo.signed-out'))
|
||
->assertRedirect(route('woo.dashboard'));
|
||
}
|
||
|
||
public function test_logout_redirects_to_signed_out_page(): void
|
||
{
|
||
$user = User::factory()->create();
|
||
|
||
$this->actingAs($user)
|
||
->post(route('logout'))
|
||
->assertRedirect(route('woo.signed-out'));
|
||
|
||
$this->assertGuest();
|
||
}
|
||
}
|