fix ignored test
This commit is contained in:
parent
77a576784f
commit
d4c141664b
|
@ -48,7 +48,6 @@ import kotlinx.coroutines.flow.flowOf
|
||||||
import org.amshove.kluent.shouldBeEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.DeviceTrustLevel
|
import org.matrix.android.sdk.api.session.crypto.crosssigning.DeviceTrustLevel
|
||||||
|
@ -129,34 +128,17 @@ class DevicesViewModelTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
fun `given the viewModel when initializing it then verification listener is added`() {
|
fun `given the viewModel when initializing it then verification listener is added`() {
|
||||||
// // Given
|
// Given
|
||||||
// val fakeVerificationService = givenVerificationService()
|
val fakeVerificationService = givenVerificationService()
|
||||||
//
|
|
||||||
// // When
|
|
||||||
// val viewModel = createViewModel()
|
|
||||||
//
|
|
||||||
// // Then
|
|
||||||
// verify {
|
|
||||||
// fakeVerificationService.addListener(viewModel)
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
// When
|
||||||
@Ignore
|
createViewModel()
|
||||||
fun `given the viewModel when clearing it then verification listener is removed`() {
|
|
||||||
// // Given
|
// Then
|
||||||
// val fakeVerificationService = givenVerificationService()
|
verify {
|
||||||
//
|
fakeVerificationService.requestEventFlow()
|
||||||
// // When
|
}
|
||||||
// val viewModel = createViewModel()
|
|
||||||
// viewModel.onCleared()
|
|
||||||
//
|
|
||||||
// // Then
|
|
||||||
// verify {
|
|
||||||
// fakeVerificationService.removeListener(viewModel)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -38,12 +38,12 @@ import io.mockk.justRun
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import io.mockk.mockkStatic
|
import io.mockk.mockkStatic
|
||||||
import io.mockk.unmockkAll
|
import io.mockk.unmockkAll
|
||||||
|
import io.mockk.verify
|
||||||
import io.mockk.verifyAll
|
import io.mockk.verifyAll
|
||||||
import kotlinx.coroutines.flow.flowOf
|
import kotlinx.coroutines.flow.flowOf
|
||||||
import org.amshove.kluent.shouldBeEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.matrix.android.sdk.api.session.homeserver.HomeServerCapabilities
|
import org.matrix.android.sdk.api.session.homeserver.HomeServerCapabilities
|
||||||
|
@ -108,38 +108,20 @@ class OtherSessionsViewModelTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
fun `given the viewModel when initializing it then verification listener is added`() {
|
fun `given the viewModel when initializing it then verification listener is added`() {
|
||||||
// Given
|
// Given
|
||||||
// val fakeVerificationService = givenVerificationService()
|
val fakeVerificationService = givenVerificationService()
|
||||||
// val devices = mockk<List<DeviceFullInfo>>()
|
.also { it.givenEventFlow() }
|
||||||
// givenGetDeviceFullInfoListReturns(filterType = defaultArgs.defaultFilter, devices)
|
val devices = mockk<List<DeviceFullInfo>>()
|
||||||
//
|
givenGetDeviceFullInfoListReturns(filterType = defaultArgs.defaultFilter, devices)
|
||||||
// // When
|
|
||||||
// val viewModel = createViewModel()
|
// When
|
||||||
|
createViewModel()
|
||||||
|
|
||||||
// Then
|
// Then
|
||||||
// verify {
|
verify {
|
||||||
// fakeVerificationService.addListener(viewModel)
|
fakeVerificationService.requestEventFlow()
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@Ignore
|
|
||||||
fun `given the viewModel when clearing it then verification listener is removed`() {
|
|
||||||
// // Given
|
|
||||||
// val fakeVerificationService = givenVerificationService()
|
|
||||||
// val devices = mockk<List<DeviceFullInfo>>()
|
|
||||||
// givenGetDeviceFullInfoListReturns(filterType = defaultArgs.defaultFilter, devices)
|
|
||||||
//
|
|
||||||
// // When
|
|
||||||
// val viewModel = createViewModel()
|
|
||||||
// viewModel.onCleared()
|
|
||||||
//
|
|
||||||
// // Then
|
|
||||||
// verify {
|
|
||||||
// fakeVerificationService.removeListener(viewModel)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -48,7 +48,6 @@ import kotlinx.coroutines.flow.flowOf
|
||||||
import org.amshove.kluent.shouldBeEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel
|
import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel
|
||||||
|
@ -142,22 +141,6 @@ class SessionOverviewViewModelTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@Ignore
|
|
||||||
fun `given the viewModel when clearing it then verification listener is removed`() {
|
|
||||||
// // Given
|
|
||||||
// val fakeVerificationService = givenVerificationService()
|
|
||||||
//
|
|
||||||
// // When
|
|
||||||
// val viewModel = createViewModel()
|
|
||||||
// viewModel.onCleared()
|
|
||||||
//
|
|
||||||
// // Then
|
|
||||||
// verify {
|
|
||||||
// fakeVerificationService.removeListener(viewModel)
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `given the viewModel has been initialized then pushers are refreshed`() {
|
fun `given the viewModel has been initialized then pushers are refreshed`() {
|
||||||
createViewModel()
|
createViewModel()
|
||||||
|
|
Loading…
Reference in New Issue