-
-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
password
option to make:user
command
- Loading branch information
1 parent
58b912f
commit 5740d06
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,4 +106,21 @@ public function it_generates_with_and_without_super_option() | |
$this->assertTrue($jason->isSuper()); | ||
$this->assertFalse($girl->isSuper()); | ||
} | ||
|
||
#[Test] | ||
public function it_can_make_a_user_with_password_option() | ||
{ | ||
$this->withoutMockingConsoleOutput(); | ||
|
||
$this->assertEmpty(User::all()); | ||
|
||
$this->artisan('statamic:make:user', ['email' => '[email protected]', '--password' => 'PacManMoonwalk#84']) | ||
->expectsOutputToContain('User created successfully.'); | ||
|
||
$user = User::all()->first(); | ||
|
||
$this->assertNotEmpty($user->id()); | ||
$this->assertEquals('[email protected]', $user->email()); | ||
$this->assertNotEmpty($user->password()); | ||
} | ||
} |