File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed
Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ test ('login screen can be rendered ' , function () {
4+ visit ('/login ' )
5+ ->assertNoConsoleLogs ()
6+ ->assertNoJavaScriptErrors ()
7+ ->assertSee ('Log in to your account ' )
8+ ->assertSee ('Enter your email and password below to log in ' );
9+ });
Original file line number Diff line number Diff line change 22
33use App \Models \User ;
44
5- test ('it can show the register page ' , function () {
5+ test ('registration screen can be rendered ' , function () {
66 visit ('/register ' )
77 ->assertNoConsoleLogs ()
88 ->assertNoJavaScriptErrors ()
99 ->assertSee ('Create an account ' )
1010 ->assertSee ('Enter your details below to create your account ' );
1111});
1212
13- test ('it can register a new user ' , function () {
13+ test ('new user can be registered ' , function () {
1414 visit ('/register ' )
1515 ->fill ('name ' , 'Taylor Otwell ' )
1616 ->
fill (
'email ' ,
'[email protected] ' )
2222 $ this ->assertAuthenticated ();
2323});
2424
25- test ('it cannot register a new user when email has already been taken ' , function () {
25+ test ('new user cannot be registered when email has already been taken ' , function () {
2626 User::factory ()->create ([
2727 'name ' => 'Taylor ' ,
28283939 $ this ->assertGuest ();
4040});
4141
42- test ('it cannot register a new user when password does not match ' , function () {
42+ test ('new user cannot be registered when password does not match ' , function () {
4343 visit ('/register ' )
4444 ->fill ('name ' , 'Taylor Otwell ' )
4545 ->
fill (
'email ' ,
'[email protected] ' )
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ test ('guests are redirected to the login page ' , function () {
4+ visit ('/dashboard ' )
5+ ->assertPathEndsWith ('/login ' )
6+ ->assertNoConsoleLogs ()
7+ ->assertNoJavaScriptErrors ()
8+ ->assertSee ('Log in to your account ' )
9+ ->assertSee ('Enter your email and password below to log in ' );
10+ });
Original file line number Diff line number Diff line change 11<?php
22
3- test ('it can show the default welcome page ' , function () {
3+ test ('welcome screen can be rendered ' , function () {
44 visit ('/ ' )
55 ->assertNoConsoleLogs ()
66 ->assertNoJavaScriptErrors ()
99 ->assertSee ('Register ' );
1010});
1111
12- test ('it can browse to the register page ' , function () {
12+ test ('guests can browse to register page from welcome page ' , function () {
1313 visit ('/ ' )
1414 ->click ('Register ' )
1515 ->assertPathEndsWith ('/register ' )
1919 ->assertSee ('Enter your details below to create your account ' );
2020});
2121
22- test ('it can browse to the login page ' , function () {
22+ test ('guests can browse to login page from welcome page ' , function () {
2323 visit ('/ ' )
2424 ->click ('Log in ' )
2525 ->assertPathEndsWith ('/login ' )
You can’t perform that action at this time.
0 commit comments