playing with tests
This commit is contained in:
parent
54db5136d7
commit
97ec6ca75b
|
|
@ -1,9 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
use function Pest\Laravel\get;
|
||||
|
||||
it('returns a successful response', function () {
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
it('shows appropriate screens when not logged in', function () {
|
||||
// Act & Assert
|
||||
get(route('home'))
|
||||
->assertOk();
|
||||
->assertStatus(200)
|
||||
->assertSeeText([
|
||||
'Login',
|
||||
'Create Account',
|
||||
]);
|
||||
});
|
||||
|
||||
it('shows a registration page', function () {
|
||||
// Act & Assert
|
||||
get('/register')
|
||||
->assertStatus(200)
|
||||
->assertSeeText([
|
||||
'Registration Code',
|
||||
'Email address',
|
||||
]);
|
||||
});
|
||||
|
||||
it('shows a login page', function () {
|
||||
get('/login')
|
||||
->assertStatus(200)
|
||||
->assertSeeText([
|
||||
'Log In',
|
||||
'Click here to register',
|
||||
]);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue