laravel-websockets/tests/Dashboard/DashboardTest.php

26 lines
657 B
PHP

<?php
namespace BeyondCode\LaravelWebSockets\Tests\Dashboard;
use BeyondCode\LaravelWebSockets\Tests\Models\User;
use BeyondCode\LaravelWebSockets\Tests\TestCase;
class DashboardTest extends TestCase
{
/** @test */
public function cant_see_dashboard_without_authorization()
{
$this->get(route('laravel-websockets.dashboard'))
->assertResponseStatus(403);
}
/** @test */
public function can_see_dashboard()
{
$this->actingAs(factory(User::class)->create())
->get(route('laravel-websockets.dashboard'))
->assertResponseOk()
->see('WebSockets Dashboard');
}
}