forked from Realhedin/topjava02
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResourceControllerTest.java
More file actions
28 lines (24 loc) · 1 KB
/
ResourceControllerTest.java
File metadata and controls
28 lines (24 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package ru.javawebinar.topjava.web;
import org.junit.Test;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static ru.javawebinar.topjava.Profiles.DATAJPA;
import static ru.javawebinar.topjava.Profiles.HSQLDB;
/**
* GKislin
* 10.04.2015.
*/
@ActiveProfiles({HSQLDB, DATAJPA})
public class ResourceControllerTest extends WebTest{
@Test
public void testUserList() throws Exception {
mockMvc.perform(get("/resources/css/style.css"))
.andDo(print())
.andExpect(content().contentType(MediaType.valueOf("text/css")))
.andExpect(status().isOk());
}
}