IOS-1649 new test inbox messages are only selectable IOS-1649
authorXavier Algarra <xavier@pep-project.org>
Thu, 04 Jul 2019 15:25:58 +0200
branchIOS-1649
changeset 93004798a2719610
parent 9299 f41e64905626
child 9301 09f065c81a2c
IOS-1649 new test inbox messages are only selectable
pEpForiOSTests/Models/EmailListViewModelTest.swift
     1.1 --- a/pEpForiOSTests/Models/EmailListViewModelTest.swift	Thu Jul 04 15:25:14 2019 +0200
     1.2 +++ b/pEpForiOSTests/Models/EmailListViewModelTest.swift	Thu Jul 04 15:25:58 2019 +0200
     1.3 @@ -440,6 +440,18 @@
     1.4          XCTAssertFalse(notSelectable)
     1.5      }
     1.6  
     1.7 +    func testMessageInInboxAreOnlySelectable() {
     1.8 +        TestUtil.createMessage(uid: 1, inFolder: folder)
     1.9 +        moc.saveAndLogErrors()
    1.10 +        setupViewModel()
    1.11 +        emailListVM.startMonitoring()
    1.12 +        XCTAssertEqual(1, emailListVM.rowCount)
    1.13 +        let isEditable = emailListVM.isEditable(messageAt: IndexPath(row: 0, section: 0))
    1.14 +        XCTAssertFalse(isEditable)
    1.15 +        let isSelectable = emailListVM.isSelectable(messageAt: IndexPath(row: 0, section: 0))
    1.16 +        XCTAssertTrue(isSelectable)
    1.17 +    }
    1.18 +
    1.19      // Mark: - setting up
    1.20  
    1.21      fileprivate func setUpViewModel(forFolder folder: Folder, masterViewController: TestMasterViewController) {