File tree 8 files changed +10
-42
lines changed
8 files changed +10
-42
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ public function test_email_verification_screen_can_be_rendered()
21
21
return $ this ->markTestSkipped ('Email verification not enabled. ' );
22
22
}
23
23
24
- $ user = User::factory ()->withPersonalTeam ()->create ([
25
- 'email_verified_at ' => null ,
26
- ]);
24
+ $ user = User::factory ()->withPersonalTeam ()->unverified ()->create ();
27
25
28
26
$ response = $ this ->actingAs ($ user )->get ('/email/verify ' );
29
27
@@ -38,9 +36,7 @@ public function test_email_can_be_verified()
38
36
39
37
Event::fake ();
40
38
41
- $ user = User::factory ()->create ([
42
- 'email_verified_at ' => null ,
43
- ]);
39
+ $ user = User::factory ()->unverified ()->create ();
44
40
45
41
$ verificationUrl = URL ::temporarySignedRoute (
46
42
'verification.verify ' ,
@@ -62,9 +58,7 @@ public function test_email_can_not_verified_with_invalid_hash()
62
58
return $ this ->markTestSkipped ('Email verification not enabled. ' );
63
59
}
64
60
65
- $ user = User::factory ()->create ([
66
- 'email_verified_at ' => null ,
67
- ]);
61
+ $ user = User::factory ()->unverified ()->create ();
68
62
69
63
$ verificationUrl = URL ::temporarySignedRoute (
70
64
'verification.verify ' ,
Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ class PasswordConfirmationTest extends TestCase
13
13
14
14
public function test_confirm_password_screen_can_be_rendered ()
15
15
{
16
- $ user = Features::hasTeamFeatures ()
17
- ? User::factory ()->withPersonalTeam ()->create ()
18
- : User::factory ()->create ();
16
+ $ user = User::factory ()->withPersonalTeam ()->create ();
19
17
20
18
$ response = $ this ->actingAs ($ user )->get ('/user/confirm-password ' );
21
19
Original file line number Diff line number Diff line change @@ -18,11 +18,7 @@ public function test_api_token_permissions_can_be_updated()
18
18
return $ this ->markTestSkipped ('API support is not enabled. ' );
19
19
}
20
20
21
- if (Features::hasTeamFeatures ()) {
22
- $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
23
- } else {
24
- $ this ->actingAs ($ user = User::factory ()->create ());
25
- }
21
+ $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
26
22
27
23
$ token = $ user ->tokens ()->create ([
28
24
'name ' => 'Test Token ' ,
Original file line number Diff line number Diff line change @@ -17,11 +17,7 @@ public function test_api_tokens_can_be_created()
17
17
return $ this ->markTestSkipped ('API support is not enabled. ' );
18
18
}
19
19
20
- if (Features::hasTeamFeatures ()) {
21
- $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
22
- } else {
23
- $ this ->actingAs ($ user = User::factory ()->create ());
24
- }
20
+ $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
25
21
26
22
$ response = $ this ->post ('/user/api-tokens ' , [
27
23
'name ' => 'Test Token ' ,
Original file line number Diff line number Diff line change @@ -18,11 +18,7 @@ public function test_api_tokens_can_be_deleted()
18
18
return $ this ->markTestSkipped ('API support is not enabled. ' );
19
19
}
20
20
21
- if (Features::hasTeamFeatures ()) {
22
- $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
23
- } else {
24
- $ this ->actingAs ($ user = User::factory ()->create ());
25
- }
21
+ $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
26
22
27
23
$ token = $ user ->tokens ()->create ([
28
24
'name ' => 'Test Token ' ,
Original file line number Diff line number Diff line change @@ -20,11 +20,7 @@ public function test_api_token_permissions_can_be_updated()
20
20
return $ this ->markTestSkipped ('API support is not enabled. ' );
21
21
}
22
22
23
- if (Features::hasTeamFeatures ()) {
24
- $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
25
- } else {
26
- $ this ->actingAs ($ user = User::factory ()->create ());
27
- }
23
+ $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
28
24
29
25
$ token = $ user ->tokens ()->create ([
30
26
'name ' => 'Test Token ' ,
Original file line number Diff line number Diff line change @@ -19,11 +19,7 @@ public function test_api_tokens_can_be_created()
19
19
return $ this ->markTestSkipped ('API support is not enabled. ' );
20
20
}
21
21
22
- if (Features::hasTeamFeatures ()) {
23
- $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
24
- } else {
25
- $ this ->actingAs ($ user = User::factory ()->create ());
26
- }
22
+ $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
27
23
28
24
Livewire::test (ApiTokenManager::class)
29
25
->set (['createApiTokenForm ' => [
Original file line number Diff line number Diff line change @@ -20,11 +20,7 @@ public function test_api_tokens_can_be_deleted()
20
20
return $ this ->markTestSkipped ('API support is not enabled. ' );
21
21
}
22
22
23
- if (Features::hasTeamFeatures ()) {
24
- $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
25
- } else {
26
- $ this ->actingAs ($ user = User::factory ()->create ());
27
- }
23
+ $ this ->actingAs ($ user = User::factory ()->withPersonalTeam ()->create ());
28
24
29
25
$ token = $ user ->tokens ()->create ([
30
26
'name ' => 'Test Token ' ,
You can’t perform that action at this time.
0 commit comments