laravel-websockets/tests/Dashboard/DashboardTest.php

23 lines
594 B
PHP
Raw Normal View History

2020-08-23 15:34:29 +00:00
<?php
2025-01-16 07:54:02 +00:00
namespace BlaxSoftware\LaravelWebSockets\Test\Dashboard;
2020-08-23 15:34:29 +00:00
2025-01-16 07:54:02 +00:00
use BlaxSoftware\LaravelWebSockets\Test\Models\User;
use BlaxSoftware\LaravelWebSockets\Test\TestCase;
2020-08-23 15:34:29 +00:00
class DashboardTest extends TestCase
{
2020-09-10 19:59:26 +00:00
public function test_cant_see_dashboard_without_authorization()
2020-08-23 15:34:29 +00:00
{
$this->get(route('laravel-websockets.dashboard'))
->assertResponseStatus(403);
}
2020-09-10 19:59:26 +00:00
public function test_can_see_dashboard()
2020-08-23 15:34:29 +00:00
{
2020-08-23 16:12:22 +00:00
$this->actingAs(factory(User::class)->create())
->get(route('laravel-websockets.dashboard'))
->assertResponseOk();
2020-08-23 15:34:29 +00:00
}
}