|
|
|
@ -202,7 +202,13 @@ public abstract class BaseAlarmCommentControllerTest extends AbstractControllerT |
|
|
|
doDelete("/api/alarm/" + alarm.getId() + "/comment/" + alarmComment.getId()) |
|
|
|
.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 |
|
|
|
@ -215,7 +221,13 @@ public abstract class BaseAlarmCommentControllerTest extends AbstractControllerT |
|
|
|
doDelete("/api/alarm/" + alarm.getId() + "/comment/" + alarmComment.getId()) |
|
|
|
.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 |
|
|
|
|