use of org.haiku.haikudepotserver.api1.model.user.GetUserResult in project haikudepotserver by haiku.
the class UserApiIT method testGetUser_foundWithUserUsageConditionsAgreement.
@Test
public void testGetUser_foundWithUserUsageConditionsAgreement() {
ObjectContext context = serverRuntime.newContext();
User user = integrationTestSupportService.createBasicUser(context, "testuser", "yUe4o2Nwe009");
integrationTestSupportService.agreeToUserUsageConditions(context, user);
setAuthenticatedUser("testuser");
// ------------------------------------
GetUserResult result = userApi.getUser(new GetUserRequest("testuser"));
// ------------------------------------
// just check the few things that come with the additional user usage agreement
Assertions.assertThat(result.userUsageConditionsAgreement.timestampAgreed).isNotNull();
Assertions.assertThat(result.userUsageConditionsAgreement.userUsageConditionsCode).isEqualTo("UUC2021V01");
}
use of org.haiku.haikudepotserver.api1.model.user.GetUserResult in project haikudepotserver by haiku.
the class UserApiIT method testGetUser_found.
@Test
public void testGetUser_found() {
ObjectContext context = serverRuntime.newContext();
integrationTestSupportService.createBasicUser(context, "testuser", "yUe4o2Nwe009");
setAuthenticatedUser("testuser");
// ------------------------------------
GetUserResult result = userApi.getUser(new GetUserRequest("testuser"));
// ------------------------------------
Assertions.assertThat(result.nickname).isEqualTo("testuser");
Assertions.assertThat(result.lastAuthenticationTimestamp).isNull();
Assertions.assertThat(result.createTimestamp).isNotNull();
Assertions.assertThat(result.userUsageConditionsAgreement).isNull();
// more to come here in time
}
Aggregations