485376 unit test
This commit is contained in:
parent
a934db118d
commit
35134e2d05
|
@ -235,7 +235,20 @@ public class ResponseTest
|
|||
response.addHeader("Content-Type","application/json");
|
||||
response.getWriter();
|
||||
assertEquals("application/json",response.getContentType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStrangeContentType() throws Exception
|
||||
{
|
||||
Response response = newResponse();
|
||||
|
||||
assertEquals(null, response.getContentType());
|
||||
|
||||
response.recycle();
|
||||
response.setContentType("text/html;charset=utf-8;charset=UTF-8");
|
||||
response.getWriter();
|
||||
assertEquals("text/html;charset=utf-8;charset=UTF-8",response.getContentType());
|
||||
assertEquals("utf-8",response.getCharacterEncoding().toLowerCase());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue