From ca78623b348a3ef83c02e451b0b553b431a06551 Mon Sep 17 00:00:00 2001 From: shpuld Date: Mon, 28 Jan 2019 20:15:00 +0200 Subject: fix user tl clearing and give it a test --- test/unit/specs/modules/statuses.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/unit/specs') diff --git a/test/unit/specs/modules/statuses.spec.js b/test/unit/specs/modules/statuses.spec.js index 33628b9b..01d2ce06 100644 --- a/test/unit/specs/modules/statuses.spec.js +++ b/test/unit/specs/modules/statuses.spec.js @@ -240,6 +240,15 @@ describe('The Statuses module', () => { expect(state.timelines.public.visibleStatuses[0].favorited).to.eql(true) }) + it('keeps userId when clearing user timeline', () => { + const state = cloneDeep(defaultState) + state.timelines.user.userId = 123 + + mutations.clearTimeline(state, { timeline: 'user' }) + + expect(state.timelines.user.userId).to.eql(123) + }) + describe('notifications', () => { it('removes a notification when the notice gets removed', () => { const user = { id: '1' } -- cgit v1.2.3-70-g09d2