Skip to content

Commit

Permalink
Add failing test for header parameter encoding bug (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Fink authored and bulldozer-bot[bot] committed Apr 24, 2019
1 parent 39ef706 commit a0934e6
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;

Expand Down Expand Up @@ -167,6 +168,15 @@ public void testStringHeader() throws Exception {
assertThat(takeRequest.getHeader("req"), is("str2"));
}

@Ignore("TODO(rfink): Add support for header encoding")
@Test
public void testStringHeader_withNonAsciiCharacters() throws Exception {
proxy.header(Optional.of("ü"), "ø");
RecordedRequest takeRequest = server.takeRequest();
assertThat(takeRequest.getHeader("opt"), is("ü"));
assertThat(takeRequest.getHeader("req"), is("ø"));
}

@Test
public void testAbsentIntQuery() throws Exception {
proxy.queryInt(OptionalInt.empty(), "str2");
Expand Down

0 comments on commit a0934e6

Please sign in to comment.