use of org.haiku.haikudepotserver.api1.model.user.AgreeUserUsageConditionsRequest in project haikudepotserver by haiku.
the class UserApiIT method testAgreeUserUsageConditions.
public void testAgreeUserUsageConditions() {
ObjectContext context = serverRuntime.newContext();
integrationTestSupportService.createBasicUser(context, "testuser", "yUe4o2Nwe009");
setAuthenticatedUser("testuser");
AgreeUserUsageConditionsRequest request = new AgreeUserUsageConditionsRequest();
request.userUsageConditionsCode = "UUC2019V01";
request.nickname = "testuser";
// ------------------------------------
AgreeUserUsageConditionsResult result = userApi.agreeUserUsageConditions(request);
// ------------------------------------
Assertions.assertThat(result).isNotNull();
{
User userAfter = User.getByNickname(context, "testuser");
Assertions.assertThat(userAfter.tryGetUserUsageConditionsAgreement().get().getUserUsageConditions().getCode()).isEqualTo("UUC2019V01");
}
}
Aggregations