This commit is contained in:
Pig Fang 2020-05-14 09:30:20 +08:00
parent 42508a9990
commit 94642a7cd7
2 changed files with 3 additions and 7 deletions

View File

@ -115,9 +115,4 @@ class User extends Authenticatable implements JWTSubject
{
return [];
}
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
}

View File

@ -112,8 +112,9 @@ class NotificationsControllerTest extends TestCase
$user->refresh();
$notification = $user->unreadNotifications->first();
$this->actingAs($user)
->get('/user/notifications/'.$notification->id)
$this->actingAs($user)->get('/user')->assertSee('Hyouka');
$this->get('/user/notifications/'.$notification->id)
->assertJson([
'title' => $notification->data['title'],
'content' => (new Parsedown())->text($notification->data['content']),