IOS-1457 Fix AccountPickerViewModelTest.testAccountAt_not1.
authorDirk Zimmermann <dz@pep.security>
Wed, 23 Jan 2019 09:03:20 +0100
changeset 754207cdcf39cbc8
parent 7541 5d3d374bd3e0
child 7543 6a150087b378
IOS-1457 Fix AccountPickerViewModelTest.testAccountAt_not1.
pEpForiOSTests/UI/Util/AccountPickerViewModel/AccountPickerViewModelTest.swift
     1.1 --- a/pEpForiOSTests/UI/Util/AccountPickerViewModel/AccountPickerViewModelTest.swift	Fri Jan 18 16:45:51 2019 +0100
     1.2 +++ b/pEpForiOSTests/UI/Util/AccountPickerViewModel/AccountPickerViewModelTest.swift	Wed Jan 23 09:03:20 2019 +0100
     1.3 @@ -48,8 +48,13 @@
     1.4      func testAccountAt_not1() {
     1.5          createAndSaveSecondAccount()
     1.6          let testIdx = 1
     1.7 -        let notSecondAccount = account
     1.8 -        assertPickerViewModel(accountAt: testIdx, expected: notSecondAccount, shouldFail: true)
     1.9 +
    1.10 +        let accounts = Account.all()
    1.11 +        let expectedToNotBeThisAccount = accounts[0]
    1.12 +
    1.13 +        assertPickerViewModel(accountAt: testIdx,
    1.14 +                              expected: expectedToNotBeThisAccount,
    1.15 +                              shouldFail: true)
    1.16      }
    1.17  
    1.18      // MARK: - handleUserSelected