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 2
2
3
3
use App \Models \User ;
4
4
5
- test ('it can show the register page ' , function () {
5
+ test ('registration screen can be rendered ' , function () {
6
6
visit ('/register ' )
7
7
->assertNoConsoleLogs ()
8
8
->assertNoJavaScriptErrors ()
9
9
->assertSee ('Create an account ' )
10
10
->assertSee ('Enter your details below to create your account ' );
11
11
});
12
12
13
- test ('it can register a new user ' , function () {
13
+ test ('new user can be registered ' , function () {
14
14
visit ('/register ' )
15
15
->fill ('name ' , 'Taylor Otwell ' )
16
16
->
fill (
'email ' ,
'[email protected] ' )
22
22
$ this ->assertAuthenticated ();
23
23
});
24
24
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 () {
26
26
User::factory ()->create ([
27
27
'name ' => 'Taylor ' ,
28
28
39
39
$ this ->assertGuest ();
40
40
});
41
41
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 () {
43
43
visit ('/register ' )
44
44
->fill ('name ' , 'Taylor Otwell ' )
45
45
->
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 1
1
<?php
2
2
3
- test ('it can show the default welcome page ' , function () {
3
+ test ('welcome screen can be rendered ' , function () {
4
4
visit ('/ ' )
5
5
->assertNoConsoleLogs ()
6
6
->assertNoJavaScriptErrors ()
9
9
->assertSee ('Register ' );
10
10
});
11
11
12
- test ('it can browse to the register page ' , function () {
12
+ test ('guests can browse to register page from welcome page ' , function () {
13
13
visit ('/ ' )
14
14
->click ('Register ' )
15
15
->assertPathEndsWith ('/register ' )
19
19
->assertSee ('Enter your details below to create your account ' );
20
20
});
21
21
22
- test ('it can browse to the login page ' , function () {
22
+ test ('guests can browse to login page from welcome page ' , function () {
23
23
visit ('/ ' )
24
24
->click ('Log in ' )
25
25
->assertPathEndsWith ('/login ' )
You can’t perform that action at this time.
0 commit comments