fixed tests
This commit is contained in:
parent
a0f46e2e24
commit
c748702933
@ -202,7 +202,13 @@ public abstract class BaseAlarmCommentControllerTest extends AbstractControllerT
|
|||||||
doDelete("/api/alarm/" + alarm.getId() + "/comment/" + alarmComment.getId())
|
doDelete("/api/alarm/" + alarm.getId() + "/comment/" + alarmComment.getId())
|
||||||
.andExpect(status().isOk());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
testLogEntityAction(alarm, alarm.getId(), tenantId, customerId, customerUserId, CUSTOMER_USER_EMAIL, ActionType.DELETED_COMMENT, 1, alarmComment);
|
AlarmComment expectedAlarmComment = AlarmComment.builder()
|
||||||
|
.alarmId(alarm.getId())
|
||||||
|
.type(AlarmCommentType.SYSTEM)
|
||||||
|
.comment(JacksonUtil.newObjectNode().put("text", String.format("User %s deleted his comment",
|
||||||
|
CUSTOMER_USER_EMAIL)))
|
||||||
|
.build();
|
||||||
|
testLogEntityAction(alarm, alarm.getId(), tenantId, customerId, customerUserId, CUSTOMER_USER_EMAIL, ActionType.DELETED_COMMENT, 1, expectedAlarmComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -215,7 +221,13 @@ public abstract class BaseAlarmCommentControllerTest extends AbstractControllerT
|
|||||||
doDelete("/api/alarm/" + alarm.getId() + "/comment/" + alarmComment.getId())
|
doDelete("/api/alarm/" + alarm.getId() + "/comment/" + alarmComment.getId())
|
||||||
.andExpect(status().isOk());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
testLogEntityAction(alarm, alarm.getId(), tenantId, customerId, tenantAdminUserId, TENANT_ADMIN_EMAIL, ActionType.DELETED_COMMENT, 1, alarmComment);
|
AlarmComment expectedAlarmComment = AlarmComment.builder()
|
||||||
|
.alarmId(alarm.getId())
|
||||||
|
.type(AlarmCommentType.SYSTEM)
|
||||||
|
.comment(JacksonUtil.newObjectNode().put("text", String.format("User %s deleted his comment",
|
||||||
|
TENANT_ADMIN_EMAIL)))
|
||||||
|
.build();
|
||||||
|
testLogEntityAction(alarm, alarm.getId(), tenantId, customerId, tenantAdminUserId, TENANT_ADMIN_EMAIL, ActionType.DELETED_COMMENT, 1, expectedAlarmComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user