IOS-647 fixes: deleted mail(s) not found in tests IOS-647
authorbuff <andreas@pep-project.org>
Mon, 07 Jan 2019 14:22:59 +0100
branchIOS-647
changeset 7441c1bbcff8e053
parent 7440 790b3f124563
child 7442 b1a815dc7290
IOS-647 fixes: deleted mail(s) not found in tests
pEpForiOSTests/UI/Compose/ViewModel/ComposeViewModelTest.swift
     1.1 --- a/pEpForiOSTests/UI/Compose/ViewModel/ComposeViewModelTest.swift	Mon Jan 07 14:06:46 2019 +0100
     1.2 +++ b/pEpForiOSTests/UI/Compose/ViewModel/ComposeViewModelTest.swift	Mon Jan 07 14:22:59 2019 +0100
     1.3 @@ -629,8 +629,8 @@
     1.4          guard
     1.5              let draftsFolder = drafts,
     1.6              let testeeDrafted = Message.by(uid: 0,
     1.7 -                                       folderName: draftsFolder.name,
     1.8 -                                       accountAddress: account.user.address)
     1.9 +                                           folderName: draftsFolder.name,
    1.10 +                                           accountAddress: account.user.address)
    1.11              else {
    1.12                  XCTFail("Message not saved to drafts")
    1.13                  return
    1.14 @@ -697,7 +697,8 @@
    1.15          let msgWithTestMessageId = Message.by(uid: originalMessage.uid,
    1.16                                                uuid: originalMessage.uuid,
    1.17                                                folderName: originalMessage.parent.name,
    1.18 -                                              accountAddress: account.user.address)
    1.19 +                                              accountAddress: account.user.address,
    1.20 +                                              includingDeleted: true)
    1.21          XCTAssertTrue(msgWithTestMessageId?.imapFlags?.deleted ?? false,
    1.22                       "The user edited draft. Technically we save a new message, thus the original" +
    1.23              " must be deleted.")
    1.24 @@ -990,7 +991,8 @@
    1.25              Message.by(uid: originalMessage.uid,
    1.26                         uuid: originalMessage.uuid,
    1.27                         folderName: originalMessage.parent.name,
    1.28 -                       accountAddress: account.user.address)?.imapFlags?.deleted
    1.29 +                       accountAddress: account.user.address,
    1.30 +                       includingDeleted: true)?.imapFlags?.deleted
    1.31              else {
    1.32                  XCTFail()
    1.33                  return