File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66use Tests \TestCase ;
77
88class CheckUserEmailExistTest extends TestCase {
9- public function testItFindsEmailInApidbUsersTable () {
9+ public function testItFindsEmailInApiUsersTable () {
1010 User::factory ()->create ([
1111 'email ' => 'user@example.com ' ,
1212 ]);
@@ -22,4 +22,15 @@ public function testItReturnsNotFoundIfEmailDoesNotExist() {
2222 ->expectsOutput ('NOT FOUND: nonexistent@example.com ' )
2323 ->assertExitCode (0 );
2424 }
25+
26+ public function testItChecksMultipleEmails () {
27+ User::factory ()->create (['email ' => 'user@example.com ' ]);
28+
29+ $ emails = ['user@example.com ' , 'other@example.com ' ];
30+
31+ $ this ->artisan ('wbs-user:check-email ' , ['emails ' => $ emails ])
32+ ->expectsOutput ('FOUND: user@example.com in apidb.users ' )
33+ ->expectsOutput ('NOT FOUND: other@example.com ' )
34+ ->assertExitCode (0 );
35+ }
2536}
You can’t perform that action at this time.
0 commit comments