diff --git a/app/Models/User.php b/app/Models/User.php index 15047f9a..8be064e6 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -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'); - } } diff --git a/tests/HttpTest/ControllersTest/NotificationsControllerTest.php b/tests/HttpTest/ControllersTest/NotificationsControllerTest.php index f1d95cad..1e68fdf2 100644 --- a/tests/HttpTest/ControllersTest/NotificationsControllerTest.php +++ b/tests/HttpTest/ControllersTest/NotificationsControllerTest.php @@ -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']),