Skip to content

Commit 585e740

Browse files
committed
Add more test
1 parent 5bdd21b commit 585e740

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tests/Commands/User/CheckUserEmailExistTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Tests\TestCase;
77

88
class 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' => 'user1@example.com']);
28+
29+
$emails = ['user1@example.com', 'other@example.com'];
30+
31+
$this->artisan('wbs-user:check-email', ['emails' => $emails])
32+
->expectsOutput('FOUND: user1@example.com in apidb.users')
33+
->expectsOutput('NOT FOUND: other@example.com')
34+
->assertExitCode(0);
35+
}
2536
}

0 commit comments

Comments
 (0)