use of org.thingsboard.server.common.data.AdminSettings in project thingsboard by thingsboard.
the class BaseAdminControllerTest method testSaveAdminSettingsWithNewJsonStructure.
@Test
public void testSaveAdminSettingsWithNewJsonStructure() throws Exception {
loginSysAdmin();
AdminSettings adminSettings = doGet("/api/admin/settings/mail", AdminSettings.class);
JsonNode json = adminSettings.getJsonValue();
((ObjectNode) json).put("newKey", "my new value");
adminSettings.setJsonValue(json);
doPost("/api/admin/settings", adminSettings).andExpect(status().isBadRequest()).andExpect(statusReason(containsString("Provided json structure is different")));
}
Aggregations