diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-11-07 22:09:34 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-11-07 22:09:34 +0100 |
| commit | f8a3afc9d14428d05115105030af1f1d300dde8e (patch) | |
| tree | 35563b55fb075092b286f477e95f37c64d22b4c0 /test/unit/specs/modules/statuses.spec.js | |
| parent | 79b2243f6ceec9e6f11e48a3d5c3c63f68636d70 (diff) | |
Don't put statuses we received from retweets into timelines.
They should be in allStatuses to keep only one reference, but they
should not get into the timeline, or it will mess up old status
fetching, because they have a very low id.
Diffstat (limited to 'test/unit/specs/modules/statuses.spec.js')
| -rw-r--r-- | test/unit/specs/modules/statuses.spec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/specs/modules/statuses.spec.js b/test/unit/specs/modules/statuses.spec.js index 75736133..fe8ed0b8 100644 --- a/test/unit/specs/modules/statuses.spec.js +++ b/test/unit/specs/modules/statuses.spec.js @@ -42,9 +42,10 @@ describe('The Statuses module', () => { retweet.retweeted_status = status - // It adds both statuses - mutations.addNewStatuses(state, { statuses: [retweet], timeline: 'public' }) - expect(state.allStatuses).to.eql([retweet, status]) + // It adds both statuses, but only the retweet to visible. + mutations.addNewStatuses(state, { statuses: [retweet], timeline: 'public', showImmediately: true }) + expect(state.timelines.public.visibleStatuses).to.have.length(1) + expect(state.allStatuses).to.eql([status, retweet]) // It refers to the modified status. mutations.addNewStatuses(state, { statuses: [modStatus], timeline: 'public' }) |
