Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
701876f4
Unverified
Commit
701876f4
authored
Mar 23, 2019
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✅
增加单元测试用例
parent
b0aa22d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
src/test/java/org/b3log/solo/processor/console/OtherConsoleTestCase.java
...rg/b3log/solo/processor/console/OtherConsoleTestCase.java
+49
-0
No files found.
src/test/java/org/b3log/solo/processor/console/OtherConsoleTestCase.java
0 → 100644
View file @
701876f4
package
org
.
b3log
.
solo
.
processor
.
console
;
import
org.apache.commons.lang.StringUtils
;
import
org.b3log.solo.AbstractTestCase
;
import
org.b3log.solo.MockHttpServletRequest
;
import
org.b3log.solo.MockHttpServletResponse
;
import
org.testng.Assert
;
import
org.testng.annotations.Test
;
/**
* {@link OtherConsole} test case.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Mar 23, 2019
* @since 3.4.0
*/
@Test
(
suiteName
=
"processor"
)
public
class
OtherConsoleTestCase
extends
AbstractTestCase
{
/**
* Init.
*
* @throws Exception exception
*/
@Test
public
void
init
()
throws
Exception
{
super
.
init
();
}
/**
* removeUnusedArchives.
*
* @throws Exception exception
*/
@Test
(
dependsOnMethods
=
"init"
)
public
void
removeUnusedArchives
()
throws
Exception
{
final
MockHttpServletRequest
request
=
mockRequest
();
request
.
setRequestURI
(
"/console/archive/unused"
);
request
.
setMethod
(
"DELETE"
);
mockAdminLogin
(
request
);
final
MockHttpServletResponse
response
=
mockResponse
();
mockDispatcherServletService
(
request
,
response
);
final
String
content
=
response
.
body
();
Assert
.
assertTrue
(
StringUtils
.
contains
(
content
,
"sc\":true"
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment