浏览代码

registered module in SettingsJsonTest

Jan-Peter Klein 11 月之前
父节点
当前提交
08f81b7df4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/test/java/org/cryptomator/common/settings/SettingsJsonTest.java

+ 2 - 1
src/test/java/org/cryptomator/common/settings/SettingsJsonTest.java

@@ -3,6 +3,7 @@ package org.cryptomator.common.settings;
 import com.fasterxml.jackson.core.JacksonException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
 import org.hamcrest.MatcherAssert;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
@@ -68,7 +69,7 @@ public class SettingsJsonTest {
 		jsonObj.theme = UiTheme.DARK;
 		jsonObj.showTrayIcon = false;
 
-		var jsonStr = new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(jsonObj);
+		var jsonStr = new ObjectMapper().registerModule(new JavaTimeModule()).writerWithDefaultPrettyPrinter().writeValueAsString(jsonObj);
 
 		MatcherAssert.assertThat(jsonStr, containsString("\"theme\" : \"DARK\""));
 		MatcherAssert.assertThat(jsonStr, containsString("\"showTrayIcon\" : false"));