|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package com.community.pocket; |
|
|
|
|
|
|
|
|
|
import com.community.pocket.entity.po.Forum; |
|
|
|
|
import com.community.pocket.entity.po.android.Garbage; |
|
|
|
|
import com.community.pocket.entity.po.android.GarbageWastePrice; |
|
|
|
|
import com.community.pocket.entity.vo.android.GarbageCateGory; |
|
|
|
@ -143,14 +144,16 @@ class DemoApplicationTests { |
|
|
|
|
).andDo(MockMvcResultHandlers.print()).andReturn(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//测试查询帖子
|
|
|
|
|
@Test |
|
|
|
|
void queryForum() throws Exception { |
|
|
|
|
mockMvc.perform(MockMvcRequestBuilders.get("/api/forum/posts") |
|
|
|
|
|
|
|
|
|
.param("status", Forum.ForumStatus.ok.name()) |
|
|
|
|
.param("currentPage", "1") |
|
|
|
|
).andDo(MockMvcResultHandlers.print()).andReturn(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//测试登陆
|
|
|
|
|
@Test |
|
|
|
|
void login() throws Exception { |
|
|
|
|
mockMvc.perform(MockMvcRequestBuilders.post("/login") |
|
|
|
|