File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ public function testMagicLinkSubmitNoEmail(): void
5050 ]);
5151
5252 $ result ->assertRedirectTo (route_to ('magic-link ' ));
53- $ result ->assertSessionHas ('error ' , lang ('Auth.invalidEmail ' ));
53+ $ expected = ['email ' => 'The Email Address field is required. ' ];
54+
55+ $ result ->assertSessionHas ('errors ' , $ expected );
5456 }
5557
5658 public function testMagicLinkSubmitBadEmail (): void
Original file line number Diff line number Diff line change @@ -46,4 +46,15 @@ public function testAfterLoggedInNotAllowDisplayMagicLink()
4646 $ result = $ this ->get ('/login/magic-link ' );
4747 $ result ->assertRedirectTo (config ('Auth ' )->loginRedirect ());
4848 }
49+
50+ public function testShowValidateErrorsInMagicLink ()
51+ {
52+ $ result = $ this ->post ('/login/magic-link ' , [
53+ 'email ' => 'foo@example ' ,
54+ ]);
55+
56+ $ expected = ['email ' => 'The Email Address field must contain a valid email address. ' ];
57+
58+ $ result ->assertSessionHas ('errors ' , $ expected );
59+ }
4960}
You can’t perform that action at this time.
0 commit comments