Skip to content

Commit

Permalink
Merge pull request square#918 from square/jwilson_0611_scheme
Browse files Browse the repository at this point in the history
Test bogus scheme.
  • Loading branch information
JakeWharton committed Jun 11, 2014
2 parents 2938800 + 44300bd commit a3b413d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions okhttp-tests/src/test/java/com/squareup/okhttp/CallTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import okio.Okio;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static java.lang.Thread.UncaughtExceptionHandler;
Expand Down Expand Up @@ -108,6 +109,15 @@ public final class CallTest {
assertNull(recordedRequest.getHeader("Content-Length"));
}

@Ignore // TODO(jwilson): fix.
@Test public void invalidScheme() throws Exception {
try {
new Request.Builder().url("ftp://hostname/path");
fail();
} catch (IllegalArgumentException expected) {
}
}

@Test public void getReturns500() throws Exception {
server.enqueue(new MockResponse().setResponseCode(500));
server.play();
Expand Down

0 comments on commit a3b413d

Please sign in to comment.