Add changelog.

This commit is contained in:
Onuray Sahin 2022-12-22 15:39:10 +03:00
parent fcac1849c3
commit a96f2d5771
2 changed files with 12 additions and 0 deletions

1
changelog.d/7836.misc Normal file
View file

@ -0,0 +1 @@
Increase session manager test coverage

View file

@ -63,6 +63,11 @@ class DeleteMatrixClientInfoUseCaseTest {
// Given // Given
val error = Exception() val error = Exception()
givenSetMatrixClientInfoFails(error) givenSetMatrixClientInfoFails(error)
val expectedClientInfoToBeSet = MatrixClientInfoContent(
name = "",
version = "",
url = "",
)
// When // When
val result = deleteMatrixClientInfoUseCase.execute() val result = deleteMatrixClientInfoUseCase.execute()
@ -70,6 +75,12 @@ class DeleteMatrixClientInfoUseCaseTest {
// Then // Then
result.isFailure shouldBe true result.isFailure shouldBe true
result.exceptionOrNull() shouldBeEqualTo error result.exceptionOrNull() shouldBeEqualTo error
coVerify {
fakeSetMatrixClientInfoUseCase.execute(
fakeActiveSessionHolder.fakeSession,
expectedClientInfoToBeSet
)
}
} }
private fun givenSetMatrixClientInfoSucceeds() { private fun givenSetMatrixClientInfoSucceeds() {