|
1 | 1 | <?php |
2 | 2 |
|
3 | | -namespace Tests; |
| 3 | +it('creates a new user', function () { |
| 4 | + $this->artisan('make:user') |
| 5 | + -> expectsQuestion( "What is the new user's email address?", '[email protected]') |
| 6 | + ->expectsQuestion("What is the new user's name?", 'Test User') |
| 7 | + ->expectsQuestion("What is the new user's password? (blank generates a random one)", '') |
| 8 | + ->expectsQuestion('Should the password be encrypted?', 'yes') |
| 9 | + ->expectsQuestion('Do you want to send a password reset email?', 'no') |
| 10 | + ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', ''); |
| 11 | +}); |
4 | 12 |
|
5 | | -class MakeUserTest extends TestCase |
6 | | -{ |
7 | | - /** @test */ |
8 | | - public function it_creates_a_new_user() |
9 | | - { |
10 | | - $this->artisan('make:user') |
11 | | - -> expectsQuestion( "What is the new user's email address?", '[email protected]') |
12 | | - ->expectsQuestion("What is the new user's name?", 'Test User') |
13 | | - ->expectsQuestion("What is the new user's password? (blank generates a random one)", '') |
14 | | - ->expectsQuestion('Should the password be encrypted?', 'yes') |
15 | | - ->expectsQuestion('Do you want to send a password reset email?', 'no') |
16 | | - ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', ''); |
17 | | - } |
18 | | - |
19 | | - /** @test */ |
20 | | - public function it_creates_a_new_user_with_additional_fields() |
21 | | - { |
22 | | - $this->artisan('make:user') |
23 | | - -> expectsQuestion( "What is the new user's email address?", '[email protected]') |
24 | | - ->expectsQuestion("What is the new user's name?", 'Test User') |
25 | | - ->expectsQuestion("What is the new user's password? (blank generates a random one)", '') |
26 | | - ->expectsQuestion('Should the password be encrypted?', 'yes') |
27 | | - ->expectsQuestion('Do you want to send a password reset email?', 'no') |
28 | | - ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', 'field=value') |
29 | | - ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', ''); |
30 | | - } |
31 | | -} |
| 13 | +it('creates a new user with additional fields', function () { |
| 14 | + $this->artisan('make:user') |
| 15 | + -> expectsQuestion( "What is the new user's email address?", '[email protected]') |
| 16 | + ->expectsQuestion("What is the new user's name?", 'Test User') |
| 17 | + ->expectsQuestion("What is the new user's password? (blank generates a random one)", '') |
| 18 | + ->expectsQuestion('Should the password be encrypted?', 'yes') |
| 19 | + ->expectsQuestion('Do you want to send a password reset email?', 'no') |
| 20 | + ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', 'field=value') |
| 21 | + ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', ''); |
| 22 | +}); |
0 commit comments