File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ public function definition(): array
2828 'email ' => fake ()->unique ()->safeEmail (),
2929 'email_verified_at ' => now (),
3030 'password ' => static ::$ password ??= Hash::make ('password ' ),
31+ 'phone ' => fake ()->numerify ('11######### ' ),
32+ 'is_active ' => true ,
3133 'remember_token ' => Str::random (10 ),
3234 ];
3335 }
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public function test_authenticated_user_can_logout(): void
8585 {
8686 $ user = User::factory ()->create ();
8787 $ user ->assignRole ('user ' );
88- $ token = auth ()->login ($ user );
88+ $ token = auth (' api ' )->login ($ user );
8989
9090 $ response = $ this ->withHeader ('Authorization ' , "Bearer $ token " )
9191 ->postJson ('/api/v1/auth/logout ' );
@@ -98,7 +98,7 @@ public function test_authenticated_user_can_refresh_token(): void
9898 {
9999 $ user = User::factory ()->create ();
100100 $ user ->assignRole ('user ' );
101- $ token = auth ()->login ($ user );
101+ $ token = auth (' api ' )->login ($ user );
102102
103103 $ response = $ this ->withHeader ('Authorization ' , "Bearer $ token " )
104104 ->postJson ('/api/v1/auth/refresh ' );
You can’t perform that action at this time.
0 commit comments