Browse Source

Fix tests

pull/14074/head
Andrii Landiak 11 months ago
parent
commit
f639b869f6
  1. 13
      dao/src/test/java/org/thingsboard/server/dao/service/ApiKeyServiceTest.java

13
dao/src/test/java/org/thingsboard/server/dao/service/ApiKeyServiceTest.java

@ -77,19 +77,6 @@ public class ApiKeyServiceTest extends AbstractServiceTest {
Assert.assertNotNull(savedApiKey.getValue());
}
@Test
public void testSaveApiKeyWithEmptyDescription() {
ApiKeyInfo apiKeyInfo = createApiKeyInfo(null);
ApiKey savedApiKey = apiKeyService.saveApiKey(tenantId, apiKeyInfo);
Assert.assertNotNull(savedApiKey);
Assert.assertNotNull(savedApiKey.getId());
Assert.assertEquals(tenantId, savedApiKey.getTenantId());
Assert.assertNull(savedApiKey.getDescription());
Assert.assertTrue(savedApiKey.isEnabled());
Assert.assertNotNull(savedApiKey.getValue());
}
@Test
public void testSaveApiKeyWithTooLongDescription() {
ApiKeyInfo apiKeyInfo = createApiKeyInfo(StringUtils.randomAlphabetic(300));

Loading…
Cancel
Save