aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-01-28 20:15:00 +0200
committershpuld <shp@cock.li>2019-01-28 20:15:00 +0200
commitca78623b348a3ef83c02e451b0b553b431a06551 (patch)
treec6c8310e332bb9b7fd3ce322e0bd32ca4cc316b1 /test
parentbb2ee04f04dac177407f7cfbc8709ed4cd9965ff (diff)
fix user tl clearing and give it a test
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/modules/statuses.spec.js9
1 files changed, 9 insertions, 0 deletions
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' }