jonnybarnes.uk/tests/Feature/Admin/AdminTest.php
Jonny Barnes c82c4524eb
Get Newest Horizon (#109)
* Re-publish Horizon assets

* Updated horizon config file

* Newest Horizon now works by using Laravel’s own auth

* For now, remove test for admin login
2019-03-21 19:46:38 +00:00

29 lines
638 B
PHP

<?php
namespace Tests\Feature\Admin;
use Tests\TestCase;
class AdminTest extends TestCase
{
public function test_admin_page_redirects_to_login()
{
$response = $this->get('/admin');
$response->assertRedirect('/login');
}
public function test_login_page()
{
$response = $this->get('/login');
$response->assertViewIs('login');
}
public function test_attempt_login_with_bad_credentials()
{
$response = $this->post('/login', [
'username' => 'bad',
'password' => 'credentials',
]);
$response->assertRedirect('/login');
}
}