Move some tests into their own subfodlers

This commit is contained in:
Jonny Barnes 2017-12-18 17:53:22 +00:00
parent 0dd6adfa0e
commit e1aa814d8c
18 changed files with 29 additions and 31 deletions

View file

@ -0,0 +1,38 @@
<?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_good_credentials()
{
$response = $this->post('/login', [
'username' => config('admin.user'),
'password' => config('admin.pass'),
]);
$response->assertRedirect('/admin');
}
public function test_attempt_login_with_bad_credentials()
{
$response = $this->post('/login', [
'username' => 'bad',
'password' => 'credentials',
]);
$response->assertRedirect('/login');
}
}