Avoid usage of not() and add unit tests.

This commit is contained in:
Benoit Marty 2025-11-07 10:18:45 +01:00
parent 9e8fe55a90
commit a7f3fb9c38
7 changed files with 58 additions and 6 deletions

View file

@ -61,7 +61,7 @@ class ChangeServerPresenter(
accountProviderUrl = data.url,
)
val details = authenticationService.setHomeserver(data.url).getOrThrow()
if (details.supportsOidcLogin.not() && details.supportsPasswordLogin.not()) {
if (details.isSupported) {
throw ChangeServerError.UnsupportedServer
}
// Homeserver is valid, remember user choice