mirror of
https://github.com/chatmail/core.git
synced 2026-05-14 20:36:30 +03:00
adapt tests
This commit is contained in:
@@ -440,12 +440,6 @@ describe('Offline Tests with unconfigured account', function () {
|
|||||||
expect(blobPath.startsWith(blobs)).to.be.true
|
expect(blobPath.startsWith(blobs)).to.be.true
|
||||||
expect(blobPath.includes('image')).to.be.true
|
expect(blobPath.includes('image')).to.be.true
|
||||||
expect(blobPath.endsWith('.jpeg')).to.be.true
|
expect(blobPath.endsWith('.jpeg')).to.be.true
|
||||||
|
|
||||||
context.setChatProfileImage(chatId, null)
|
|
||||||
expect(context.getChat(chatId).getProfileImage()).to.be.equal(
|
|
||||||
null,
|
|
||||||
'image is null'
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('test setting ephemeral timer', function () {
|
it('test setting ephemeral timer', function () {
|
||||||
|
|||||||
12
src/chat.rs
12
src/chat.rs
@@ -4368,8 +4368,16 @@ mod tests {
|
|||||||
assert_eq!(a1_chat.grpid, a2_chat.grpid);
|
assert_eq!(a1_chat.grpid, a2_chat.grpid);
|
||||||
assert_eq!(a1_chat.name, "foo");
|
assert_eq!(a1_chat.name, "foo");
|
||||||
assert_eq!(a2_chat.name, "foo");
|
assert_eq!(a2_chat.name, "foo");
|
||||||
assert_eq!(a1_chat.get_profile_image(&a1).await?, None);
|
assert!(a1_chat
|
||||||
assert_eq!(a2_chat.get_profile_image(&a2).await?, None);
|
.get_profile_image(&a1)
|
||||||
|
.await?
|
||||||
|
.unwrap()
|
||||||
|
.ends_with("icon-group.png"));
|
||||||
|
assert!(a2_chat
|
||||||
|
.get_profile_image(&a2)
|
||||||
|
.await?
|
||||||
|
.unwrap()
|
||||||
|
.ends_with("icon-group.png"));
|
||||||
assert_eq!(get_chat_contacts(&a1, a1_chat_id).await?.len(), 1);
|
assert_eq!(get_chat_contacts(&a1, a1_chat_id).await?.len(), 1);
|
||||||
assert_eq!(get_chat_contacts(&a2, a2_chat_id).await?.len(), 1);
|
assert_eq!(get_chat_contacts(&a2, a2_chat_id).await?.len(), 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user