diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 6ad3d4a8..f60333b6 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -187,9 +187,7 @@ class UserController extends Controller ->json([ 'errno' => 0, 'msg' => trans('user.profile.delete.success') - ]) - ->cookie('uid', '', time() - 3600, '/') - ->cookie('token', '', time() - 3600, '/'); + ]); } break; // @codeCoverageIgnore diff --git a/tests/UserControllerTest.php b/tests/UserControllerTest.php index 56bf3609..9ef12085 100644 --- a/tests/UserControllerTest.php +++ b/tests/UserControllerTest.php @@ -385,8 +385,7 @@ class UserControllerTest extends TestCase ])->assertJson([ 'errno' => 0, 'msg' => trans('user.profile.delete.success') - ])->assertCookie('uid', '') - ->assertCookie('token', ''); + ]); $this->assertNull(User::find($user->uid)); }