Commit a9df9df99e9902ce1c20759cd0681c43def5b350
1 parent
244bcc78
Remove unnecessary Admin settings validation
Showing
3 changed files
with
1 additions
and
25 deletions
... | ... | @@ -92,19 +92,7 @@ public abstract class BaseAdminControllerTest extends AbstractControllerTest { |
92 | 92 | .andExpect(status().isBadRequest()) |
93 | 93 | .andExpect(statusReason(containsString("is prohibited"))); |
94 | 94 | } |
95 | - | |
96 | - @Test | |
97 | - public void testSaveAdminSettingsWithNewJsonStructure() throws Exception { | |
98 | - loginSysAdmin(); | |
99 | - AdminSettings adminSettings = doGet("/api/admin/settings/mail", AdminSettings.class); | |
100 | - JsonNode json = adminSettings.getJsonValue(); | |
101 | - ((ObjectNode) json).put("newKey", "my new value"); | |
102 | - adminSettings.setJsonValue(json); | |
103 | - doPost("/api/admin/settings", adminSettings) | |
104 | - .andExpect(status().isBadRequest()) | |
105 | - .andExpect(statusReason(containsString("Provided json structure is different"))); | |
106 | - } | |
107 | - | |
95 | + | |
108 | 96 | @Test |
109 | 97 | public void testSendTestMail() throws Exception { |
110 | 98 | loginSysAdmin(); | ... | ... |
... | ... | @@ -73,9 +73,6 @@ public class AdminSettingsServiceImpl implements AdminSettingsService { |
73 | 73 | if (!existentAdminSettings.getKey().equals(adminSettings.getKey())) { |
74 | 74 | throw new DataValidationException("Changing key of admin settings entry is prohibited!"); |
75 | 75 | } |
76 | - if (adminSettings.getKey().equals("mail")) { | |
77 | - validateJsonStructure(existentAdminSettings.getJsonValue(), adminSettings.getJsonValue()); | |
78 | - } | |
79 | 76 | } |
80 | 77 | } |
81 | 78 | ... | ... |
... | ... | @@ -67,13 +67,4 @@ public abstract class BaseAdminSettingsServiceTest extends AbstractServiceTest { |
67 | 67 | adminSettings.setKey("newKey"); |
68 | 68 | adminSettingsService.saveAdminSettings(SYSTEM_TENANT_ID, adminSettings); |
69 | 69 | } |
70 | - | |
71 | - @Test(expected = DataValidationException.class) | |
72 | - public void testSaveAdminSettingsWithNewJsonStructure() { | |
73 | - AdminSettings adminSettings = adminSettingsService.findAdminSettingsByKey(SYSTEM_TENANT_ID, "mail"); | |
74 | - JsonNode json = adminSettings.getJsonValue(); | |
75 | - ((ObjectNode) json).put("newKey", "my new value"); | |
76 | - adminSettings.setJsonValue(json); | |
77 | - adminSettingsService.saveAdminSettings(SYSTEM_TENANT_ID, adminSettings); | |
78 | - } | |
79 | 70 | } | ... | ... |