aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/modules
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-08-30 16:34:24 +0300
committerHenry Jameson <me@hjkos.com>2018-08-30 16:34:24 +0300
commit4589466917c5f30a6c3cce97c839c7fecf069a34 (patch)
tree30924c945c0db46f0bbbdeb05abff34bce1aebd5 /test/unit/specs/modules
parent507d5bc4443ec72122a53be64527ffd681d9f77c (diff)
fixup! Added logic to process reply to favorite request and update likes counter accordingly. Should fix some of cases of doubled likes and likes counter not decrementing.
Diffstat (limited to 'test/unit/specs/modules')
-rw-r--r--test/unit/specs/modules/statuses.spec.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/specs/modules/statuses.spec.js b/test/unit/specs/modules/statuses.spec.js
index ba459b38..1666ef5d 100644
--- a/test/unit/specs/modules/statuses.spec.js
+++ b/test/unit/specs/modules/statuses.spec.js
@@ -264,7 +264,7 @@ describe('The Statuses module', () => {
expect(state.timelines.public.visibleStatuses[0].fave_num).to.eql(1)
expect(state.timelines.public.maxId).to.eq(favorite.id)
- // If something is favorited by the current user, it also sets the 'favorited' property
+ // If something is favorited by the current user, it also sets the 'favorited' property but does not increment counter to avoid over-counting. Counter is incremented (updated, really) via response to the favorite request.
const user = {
id: 1
}
@@ -281,7 +281,7 @@ describe('The Statuses module', () => {
mutations.addNewStatuses(state, { statuses: [ownFavorite], showImmediately: true, timeline: 'public', user })
expect(state.timelines.public.visibleStatuses.length).to.eql(1)
- expect(state.timelines.public.visibleStatuses[0].fave_num).to.eql(2)
+ expect(state.timelines.public.visibleStatuses[0].fave_num).to.eql(1)
expect(state.timelines.public.visibleStatuses[0].favorited).to.eql(true)
})