Skip to content

Commit

Permalink
#12 reproduced
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Apr 11, 2014
1 parent 9cf65d2 commit a24ac0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/java/com/jcabi/http/response/JsonResponseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public final class JsonResponseTest {
@Test
public void readsJsonDocument() throws Exception {
final Response resp = new FakeRequest()
.withBody("{\"foo-foo\":2, \"bar\":\"hello!\"}")
.withBody("{\n\t\r\"foo-foo\":2,\n\"bar\":\"\u20ac\"}")
.fetch();
final JsonResponse response = new JsonResponse(resp);
MatcherAssert.assertThat(
Expand All @@ -60,7 +60,7 @@ public void readsJsonDocument() throws Exception {
);
MatcherAssert.assertThat(
response.json().readObject().getString("bar"),
Matchers.equalTo("hello!")
Matchers.equalTo("\u20ac")
);
}

Expand All @@ -72,7 +72,7 @@ public void readsJsonDocument() throws Exception {
@Test
public void readsControlCharacters() throws Exception {
final Response resp = new FakeRequest()
.withBody("{\"test\": \"\u001Fblah\u0001cwhoa\u0000!\"}").fetch();
.withBody("{\"test\":\n\"\u001Fblah\u0001cwhoa\u0000!\"}").fetch();
final JsonResponse response = new JsonResponse(resp);
MatcherAssert.assertThat(
response.json().readObject().getString("test"),
Expand Down

0 comments on commit a24ac0d

Please sign in to comment.