Browse Source

added test

pull/9560/head
dashevchenko 3 years ago
parent
commit
05848c4920
  1. 2
      application/src/test/java/org/thingsboard/server/service/notification/NotificationTargetApiTest.java

2
application/src/test/java/org/thingsboard/server/service/notification/NotificationTargetApiTest.java

@ -24,6 +24,7 @@ import org.springframework.test.web.servlet.ResultMatcher;
import org.thingsboard.server.common.data.User;
import org.thingsboard.server.common.data.id.TenantId;
import org.thingsboard.server.common.data.notification.NotificationDeliveryMethod;
import org.thingsboard.server.common.data.notification.NotificationType;
import org.thingsboard.server.common.data.notification.rule.trigger.config.EntityActionNotificationRuleTriggerConfig;
import org.thingsboard.server.common.data.notification.targets.NotificationTarget;
import org.thingsboard.server.common.data.notification.targets.platform.AllUsersFilter;
@ -144,6 +145,7 @@ public class NotificationTargetApiTest extends AbstractNotificationApiTest {
notificationTarget.setConfiguration(targetConfig);
save(notificationTarget, status().isOk());
assertThat(notificationTargetDao.findByTenantIdAndPageLink(differentTenantId, new PageLink(10)).getData()).isNotEmpty();
assertThat(notificationTargetDao.findByTenantIdAndSupportedNotificationTypeAndPageLink(differentTenantId, NotificationType.GENERAL, new PageLink(10)).getData()).isNotEmpty();
deleteDifferentTenant();
assertThat(notificationTargetDao.findByTenantIdAndPageLink(differentTenantId, new PageLink(10)).getData()).isEmpty();

Loading…
Cancel
Save