From d1444619ab273387848b6849e774fc5fa852358b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 Sep 2019 12:15:46 +0200 Subject: [PATCH] Give the test more sence --- .../NotificationMenu/NotificationMenu.spec.js | 16 +++++++++++++++- .../NotificationMenu/NotificationMenu.vue | 6 +++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/webapp/components/notifications/NotificationMenu/NotificationMenu.spec.js b/webapp/components/notifications/NotificationMenu/NotificationMenu.spec.js index b8d988b58..5805f475e 100644 --- a/webapp/components/notifications/NotificationMenu/NotificationMenu.spec.js +++ b/webapp/components/notifications/NotificationMenu/NotificationMenu.spec.js @@ -79,12 +79,26 @@ describe('NotificationMenu.vue', () => { }, }, }, + { + id: 'notification-43', + read: true, + post: { + id: 'post-3', + title: 'red post title', + contentExcerpt: 'this is yet another post content', + author: { + id: 'john-1', + slug: 'john-doe', + name: 'John Doe', + }, + }, + }, ], } } }) - it('displays the total number of notifications', () => { + it('displays the unred number of notifications', () => { wrapper = Wrapper() expect(wrapper.find('ds-button-stub').text()).toEqual('2') }) diff --git a/webapp/components/notifications/NotificationMenu/NotificationMenu.vue b/webapp/components/notifications/NotificationMenu/NotificationMenu.vue index f96bd9e73..cbb351d8e 100644 --- a/webapp/components/notifications/NotificationMenu/NotificationMenu.vue +++ b/webapp/components/notifications/NotificationMenu/NotificationMenu.vue @@ -5,7 +5,7 @@ @click.prevent="updateNotifications" > - {{ unreadNotifications }} + {{ unredNotifications }} @@ -18,7 +18,7 @@ updateNotifications() " > - {{ unreadNotifications }} + {{ unredNotifications }}