mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-09-18 17:48:03 +08:00
v1.33.0 更新
This commit is contained in:
@@ -31,7 +31,7 @@ public class SaCookieTest {
|
||||
Assertions.assertEquals(cookie.getSameSite(), "Lax");
|
||||
Assertions.assertEquals(cookie.getHttpOnly(), true);
|
||||
Assertions.assertEquals(cookie.getSecure(), true);
|
||||
Assertions.assertEquals(cookie.toHeaderValue(), "satoken=xxxx-xxxx-xxxx-xxxx; Domain=https://sa-token.cc/; Path=/; Secure; HttpOnly; sameSite=Lax");
|
||||
Assertions.assertEquals(cookie.toHeaderValue(), "satoken=xxxx-xxxx-xxxx-xxxx; Domain=https://sa-token.cc/; Path=/; Secure; HttpOnly; SameSite=Lax");
|
||||
|
||||
Assertions.assertNotNull(cookie.toString());
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@ package cn.dev33.satoken.core.json;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import cn.dev33.satoken.exception.ApiDisabledException;
|
||||
import cn.dev33.satoken.exception.NotImplException;
|
||||
import cn.dev33.satoken.json.SaJsonTemplateDefaultImpl;
|
||||
import cn.dev33.satoken.util.SoMap;
|
||||
|
||||
@@ -18,12 +18,12 @@ public class SaJsonTemplateDefaultImplTest {
|
||||
@Test
|
||||
public void testSaJsonTemplateDefaultImpl() {
|
||||
SaJsonTemplateDefaultImpl saJsonTemplate = new SaJsonTemplateDefaultImpl();
|
||||
// API 禁用
|
||||
Assertions.assertThrows(ApiDisabledException.class, () -> {
|
||||
// 组件未实现
|
||||
Assertions.assertThrows(NotImplException.class, () -> {
|
||||
saJsonTemplate.parseJsonToMap("{}");
|
||||
});
|
||||
// API 禁用
|
||||
Assertions.assertThrows(ApiDisabledException.class, () -> {
|
||||
// 组件未实现
|
||||
Assertions.assertThrows(NotImplException.class, () -> {
|
||||
saJsonTemplate.toJsonString(SoMap.getSoMap("name", "zhangsan"));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user