From 44300bdf378e70b00cf3dcab5c1ad74365ba9b53 Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Wed, 11 Jun 2014 00:48:55 -0400 Subject: [PATCH] Test bogus scheme. --- .../src/test/java/com/squareup/okhttp/CallTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/okhttp-tests/src/test/java/com/squareup/okhttp/CallTest.java b/okhttp-tests/src/test/java/com/squareup/okhttp/CallTest.java index 17496ef5d088..8a0de0a5384f 100644 --- a/okhttp-tests/src/test/java/com/squareup/okhttp/CallTest.java +++ b/okhttp-tests/src/test/java/com/squareup/okhttp/CallTest.java @@ -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; @@ -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();