IOS-1649 new test outbox messages are non selectable neither editable IOS-1649
authorXavier Algarra <xavier@pep-project.org>
Thu, 04 Jul 2019 15:25:14 +0200
branchIOS-1649
changeset 9299f41e64905626
parent 9298 63c9169a532b
child 9300 4798a2719610
IOS-1649 new test outbox messages are non selectable neither editable
pEpForiOSTests/Models/EmailListViewModelTest.swift
     1.1 --- a/pEpForiOSTests/Models/EmailListViewModelTest.swift	Thu Jul 04 15:24:02 2019 +0200
     1.2 +++ b/pEpForiOSTests/Models/EmailListViewModelTest.swift	Thu Jul 04 15:25:14 2019 +0200
     1.3 @@ -428,6 +428,18 @@
     1.4          wait(for: [messageDidSaveExpectation], timeout: UnitTestUtils.waitTime)
     1.5      }
     1.6  
     1.7 +    func testMessageInOutboxAreNonEditableAndNonSelectable() {
     1.8 +        TestUtil.createMessage(uid: 1, inFolder: outboxFolder)
     1.9 +        moc.saveAndLogErrors()
    1.10 +        setupViewModel(forfolder: outboxFolder)
    1.11 +        emailListVM.startMonitoring()
    1.12 +        XCTAssertEqual(1, emailListVM.rowCount)
    1.13 +        let notEditable = emailListVM.isEditable(messageAt: IndexPath(row: 0, section: 0))
    1.14 +        XCTAssertFalse(notEditable)
    1.15 +        let notSelectable = emailListVM.isSelectable(messageAt: IndexPath(row: 0, section: 0))
    1.16 +        XCTAssertFalse(notSelectable)
    1.17 +    }
    1.18 +
    1.19      // Mark: - setting up
    1.20  
    1.21      fileprivate func setUpViewModel(forFolder folder: Folder, masterViewController: TestMasterViewController) {