Fix processing cookies after deleting user

This commit is contained in:
Pig Fang 2018-07-19 10:45:06 +08:00
parent 389de2aa84
commit 24b2107c48
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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));
}