Commit 48651cfb authored by Liang Ding's avatar Liang Ding

💚 修复测试用例

parent 6ebb9801
...@@ -254,6 +254,15 @@ ...@@ -254,6 +254,15 @@
</resource> </resource>
</resources> </resources>
<testResources>
<testResource>
<directory>src/main/webapp</directory>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.eluder.coveralls</groupId> <groupId>org.eluder.coveralls</groupId>
...@@ -283,7 +292,6 @@ ...@@ -283,7 +292,6 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version> <version>${maven-surefire-plugin.version}</version>
<configuration> <configuration>
<additionalClasspathElements>src/main/webapp</additionalClasspathElements>
<useSystemClassLoader>false</useSystemClassLoader> <useSystemClassLoader>false</useSystemClassLoader>
</configuration> </configuration>
</plugin> </plugin>
......
...@@ -34,7 +34,7 @@ import org.testng.annotations.Test; ...@@ -34,7 +34,7 @@ import org.testng.annotations.Test;
* {@link ArticleProcessor} test case. * {@link ArticleProcessor} test case.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.3, Oct 28, 2018 * @version 1.0.1.4, Feb 22, 2019
* @since 1.7.0 * @since 1.7.0
*/ */
@Test(suiteName = "processor") @Test(suiteName = "processor")
...@@ -223,7 +223,7 @@ public class ArticleProcessorTestCase extends AbstractTestCase { ...@@ -223,7 +223,7 @@ public class ArticleProcessorTestCase extends AbstractTestCase {
mockDispatcherServletService(request, response); mockDispatcherServletService(request, response);
final String content = response.body(); final String content = response.body();
Assert.assertTrue(StringUtils.contains(content, "<title>Solo 的个人博客 - 访问密码</title>")); Assert.assertTrue(StringUtils.contains(content, "<title>访问密码 - Solo 的个人博客</title>"));
} }
/** /**
......
...@@ -28,7 +28,7 @@ import org.testng.annotations.Test; ...@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
* {@link ErrorProcessor} test case. * {@link ErrorProcessor} test case.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.2, Nov 28, 2018 * @version 1.0.1.3, Feb 22, 2019
* @since 1.7.0 * @since 1.7.0
*/ */
@Test(suiteName = "processor") @Test(suiteName = "processor")
...@@ -55,6 +55,6 @@ public class ErrorProcessorTestCase extends AbstractTestCase { ...@@ -55,6 +55,6 @@ public class ErrorProcessorTestCase extends AbstractTestCase {
mockDispatcherServletService(request, response); mockDispatcherServletService(request, response);
final String content = response.body(); final String content = response.body();
Assert.assertTrue(StringUtils.contains(content, "<title>Solo 的个人博客 - 403 Forbidden!</title>")); Assert.assertTrue(StringUtils.contains(content, "<title>403 Forbidden! - Solo 的个人博客</title>"));
} }
} }
...@@ -32,7 +32,7 @@ import java.util.List; ...@@ -32,7 +32,7 @@ import java.util.List;
* {@link IndexProcessor} test case. * {@link IndexProcessor} test case.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.3, Feb 7, 2019 * @version 1.0.1.4, Feb 22, 2019
* @since 1.7.0 * @since 1.7.0
*/ */
@Test(suiteName = "processor") @Test(suiteName = "processor")
...@@ -87,7 +87,7 @@ public class IndexProcessorTestCase extends AbstractTestCase { ...@@ -87,7 +87,7 @@ public class IndexProcessorTestCase extends AbstractTestCase {
mockDispatcherServletService(request, response); mockDispatcherServletService(request, response);
final String content = response.body(); final String content = response.body();
Assert.assertTrue(StringUtils.contains(content, "<title>Solo 的个人博客 - 403 Forbidden!</title>")); Assert.assertTrue(StringUtils.contains(content, "<title>Kill IE! - Solo 的个人博客</title>"));
} }
/** /**
......
...@@ -28,7 +28,7 @@ import org.testng.annotations.Test; ...@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
* {@link AdminConsole} test case. * {@link AdminConsole} test case.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Dec 7, 2018 * @version 1.0.0.2, Feb 22, 2019
* @since 2.9.7 * @since 2.9.7
*/ */
@Test(suiteName = "processor") @Test(suiteName = "processor")
...@@ -95,7 +95,7 @@ public class AdminConsoleTestCase extends AbstractTestCase { ...@@ -95,7 +95,7 @@ public class AdminConsoleTestCase extends AbstractTestCase {
mockDispatcherServletService(request, response); mockDispatcherServletService(request, response);
final String content = response.body(); final String content = response.body();
Assert.assertTrue(StringUtils.contains(content, "<div id=\"tabPreference\" class=\"sub-tabs fn-clear\">")); Assert.assertTrue(StringUtils.contains(content, "信息配置"));
} }
/** /**
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# #
# Description: B3log Latke configurations for test. # Description: B3log Latke configurations for test.
# Version: 1.0.0.0, Feb 14, 2019 # Version: 1.0.0.1, Feb 22, 2019
# Author: Liang Ding # Author: Liang Ding
# #
...@@ -35,5 +35,5 @@ cookieName=solo ...@@ -35,5 +35,5 @@ cookieName=solo
cookieSecret=Beyond cookieSecret=Beyond
#### Runtime Mode #### #### Runtime Mode ####
runtimeMode=DEVELOPMENT #runtimeMode=DEVELOPMENT
#runtimeMode=PRODUCTION runtimeMode=PRODUCTION
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment