aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2020-11-02 08:35:22 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2020-11-02 08:35:22 +0000
commitbcb6ee328f339366f2a661dc205013d12e2f39c3 (patch)
treeaf9f4ac8ec78226a3c624f1c34b6aef0b9589f16 /test
parent5254fdba75fc8d645c2235902a39b79c45f9aa6f (diff)
parent757706425a1c865a0e64e9c530b3aa1e7d9e2494 (diff)
Merge branch 'fix/use-ids-for-chat-last-seen' into 'develop'
Fix: Use ids for chat last seen instead of timestamp See merge request pleroma/pleroma-fe!1270
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/services/chat_service/chat_service.spec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/specs/services/chat_service/chat_service.spec.js b/test/unit/specs/services/chat_service/chat_service.spec.js
index 15e64bb5..0251cae7 100644
--- a/test/unit/specs/services/chat_service/chat_service.spec.js
+++ b/test/unit/specs/services/chat_service/chat_service.spec.js
@@ -47,10 +47,10 @@ describe('chatService', () => {
chatService.resetNewMessageCount(chat)
expect(chat.newMessageCount).to.eql(0)
+ expect(chat.lastSeenMessageId).to.eql(message2.id)
- const createdAt = new Date()
- createdAt.setSeconds(createdAt.getSeconds() + 10)
- chatService.add(chat, { messages: [ { message3, created_at: createdAt } ] })
+ // Add message with higher id
+ chatService.add(chat, { messages: [ message3 ] })
expect(chat.newMessageCount).to.eql(1)
})
})