chore: code refactor via rector
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Feature\Livewire;
|
||||
|
||||
use App\Livewire\Dashboard\Dashboard;
|
||||
use App\Models\Plan;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -10,6 +11,7 @@ use Tests\TestCase;
|
||||
|
||||
class DashboardTest extends TestCase
|
||||
{
|
||||
public $user;
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
@@ -30,18 +32,18 @@ class DashboardTest extends TestCase
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_renders_dashboard_component()
|
||||
public function it_renders_dashboard_component(): void
|
||||
{
|
||||
$component = Livewire::test(\App\Livewire\Dashboard\Dashboard::class);
|
||||
$component = Livewire::test(Dashboard::class);
|
||||
|
||||
$component->assertStatus(200);
|
||||
$component->assertViewIs('livewire.dashboard.dashboard');
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_displays_user_information()
|
||||
public function it_displays_user_information(): void
|
||||
{
|
||||
$component = Livewire::test(\App\Livewire\Dashboard\Dashboard::class);
|
||||
$component = Livewire::test(Dashboard::class);
|
||||
|
||||
// Check that dashboard renders with usage statistics
|
||||
$component->assertSee('Mailbox Created');
|
||||
@@ -50,9 +52,9 @@ class DashboardTest extends TestCase
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_shows_subscription_status()
|
||||
public function it_shows_subscription_status(): void
|
||||
{
|
||||
$component = Livewire::test(\App\Livewire\Dashboard\Dashboard::class);
|
||||
$component = Livewire::test(Dashboard::class);
|
||||
|
||||
// Test that the component displays subscription pricing section (since user is not subscribed)
|
||||
$component->assertSee('Purchase Subscription');
|
||||
|
||||
Reference in New Issue
Block a user