Search in sources :

Example 1 with AuthenticationSettings

use of com.github.jamesnetherton.zulip.client.api.server.AuthenticationSettings in project zulip-java-client by jamesnetherton.

the class ZulipServerIT method serverSettings.

@Test
public void serverSettings() throws ZulipClientException {
    ServerSettings settings = zulip.server().getServerSettings().execute();
    assertTrue(settings.isEmailAuthEnabled());
    assertTrue(settings.isRequireEmailFormatUsernames());
    assertFalse(settings.isIncompatible());
    assertFalse(settings.isPushNotificationsEnabled());
    assertEquals("testing", settings.getRealmName());
    assertEquals("<p>The coolest place in the universe.</p>", settings.getRealmDescription());
    assertTrue(settings.getRealmIcon().startsWith("https://secure.gravatar.com"));
    AuthenticationSettings authenticationMethods = settings.getAuthenticationMethods();
    assertFalse(authenticationMethods.isAzuread());
    assertFalse(authenticationMethods.isDev());
    assertTrue(authenticationMethods.isEmail());
    assertFalse(authenticationMethods.isGithub());
    assertFalse(authenticationMethods.isGoogle());
    assertFalse(authenticationMethods.isLdap());
    assertTrue(authenticationMethods.isPassword());
    assertFalse(authenticationMethods.isRemoteuser());
    assertFalse(authenticationMethods.isSaml());
    assertTrue(settings.getExternalAuthenticationMethods().isEmpty());
}
Also used : AuthenticationSettings(com.github.jamesnetherton.zulip.client.api.server.AuthenticationSettings) ServerSettings(com.github.jamesnetherton.zulip.client.api.server.ServerSettings) Test(org.junit.jupiter.api.Test)

Aggregations

AuthenticationSettings (com.github.jamesnetherton.zulip.client.api.server.AuthenticationSettings)1 ServerSettings (com.github.jamesnetherton.zulip.client.api.server.ServerSettings)1 Test (org.junit.jupiter.api.Test)1