test: 测试类调整

This commit is contained in:
裴浩宇 2024-05-08 15:58:44 +08:00
parent 6720b83025
commit 2c471fd076

View File

@ -1,9 +1,6 @@
import com.pnkx.common.notify.FeishuISysNotify;
import com.pnkx.common.utils.StringUtils;
import org.junit.Test;
import java.io.IOException;
/**
* NotifyTest
*
@ -16,56 +13,6 @@ public class NotifyTest {
@Test
public void notifyTest() {
String content = "<div\n" +
" style=\"border-radius: 10px 10px 10px 10px;font-size:13px; color: #555555;width: 666px;font-family:'Century Gothic','Trebuchet MS','Hiragino Sans GB',微软雅黑,'Microsoft Yahei',Tahoma,Helvetica,Arial,'SimSun',sans-serif;margin:50px auto;border:1px solid #eee;max-width:100%;background: #ffffff repeating-linear-gradient(-45deg,#fff,#fff 1.125rem,transparent 1.125rem,transparent 2.25rem);box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);\">\n" +
" <div\n" +
" style=\"width:100%;background:#49BDAD;color:#ffffff;border-radius: 10px 10px 0 0;background-image: -moz-linear-gradient(0deg, rgb(67, 198, 184), rgb(255, 209, 244));background-image: -webkit-linear-gradient(0deg, rgb(67, 198, 184), rgb(255, 209, 244));height: 66px;\">\n" +
" <p\n" +
" style=\"text-align: center;font-size:15px;word-break:break-all;padding: 23px 32px;margin:0;background-color: hsla(0,0%,100%,.4);border-radius: 10px 10px 0 0;\">\n" +
" <a style=\"text-decoration:none;color: #ffffff;\" href=\"https://pnkx.top\"\n" +
" rel=\"noopener\" target=\"_blank\">\n" +
" Pei你看雪博客\n" +
" </a>\n" +
" 用户注册\n" +
" </p>\n" +
" </div>\n" +
" <div style=\"margin:40px auto;width:90%\">\n" +
" <p>亲爱的template-nickName</p>\n" +
" <div\n" +
" style=\"background: #fafafa repeating-linear-gradient(-45deg,#fff,#fff 1.125rem,transparent 1.125rem,transparent 2.25rem);box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);margin:20px 0px;padding:15px;border-radius:5px;font-size:14px;color:#555555;\">\n" +
" <p>\n" +
" 感谢您注册\n" +
" <a style=\"text-decoration:none;color: #12addb;\" href=\"https://pnkx.top\"\n" +
" rel=\"noopener\" target=\"_blank\">\n" +
" Pei你看雪博客\n" +
" </a>,请点击下方按钮完成账户激活。\n" +
" </p>\n" +
" <p style=\"margin: 2rem 0;\">\n" +
" <a style=\"border-radius: 0.2rem; background-color:#12addb55;color:#ffffff;padding: 0.5rem 1rem;\" href=\"template-url\">激活账户</a>\n" +
" </p>\n" +
" <p>\n" +
" 欢迎再次光临\n" +
" <a style=\"text-decoration:none; color:#12addb\" href=\"https://pnkx.top/\"\n" +
" rel=\"noopener\" target=\"_blank\">\n" +
" Pei你看雪博客\n" +
" </a>\n" +
"\n" +
" </p>\n" +
" <p style='color:#5A8DEE;'>\n" +
" 欢迎关注公众号\n" +
" </p>\n" +
" <p>\n" +
" <img style='width:340px;height:120px; border-radius: 0.5rem'\n" +
" src=\"https://pnkx.cloud:8866/ftp/pnkx/images/wechat.jpg\"/>\n" +
" </p>\n" +
" <p style='color:#bbb;'>\n" +
" 回复邮件TD退订\n" +
" </p>\n" +
" </div>\n" +
" </div>\n" +
"</div>";
content = StringUtils.removeHtmlTags(content);
content = StringUtils.cleanText(content);
FeishuISysNotify.sendNotification("\uD83D\uDC49 叮咚「Pei你看雪博客」您的待办提醒~", content, "");
FeishuISysNotify.sendNotification("\uD83D\uDC49 叮咚「Pei你看雪博客」您的待办提醒~", "");
}
}