Skip to content

Commit

Permalink
Merge pull request square#1321 from nfuller/FixCallTestOnAndroid
Browse files Browse the repository at this point in the history
Fix the user agent test so it works with a different user agent string
  • Loading branch information
JakeWharton committed Jan 13, 2015
2 parents b9b06e1 + 6a5a61a commit 6a95936
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion okhttp-tests/src/test/java/com/squareup/okhttp/CallTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.squareup.okhttp.internal.RecordingOkAuthenticator;
import com.squareup.okhttp.internal.SingleInetAddressNetwork;
import com.squareup.okhttp.internal.SslContextBuilder;
import com.squareup.okhttp.internal.Version;
import com.squareup.okhttp.mockwebserver.Dispatcher;
import com.squareup.okhttp.mockwebserver.MockResponse;
import com.squareup.okhttp.mockwebserver.RecordedRequest;
Expand Down Expand Up @@ -1598,7 +1599,7 @@ private void postBodyRetransmittedAfterAuthorizationFail(String body) throws Exc

RecordedRequest recordedRequest = server.takeRequest();
assertTrue(recordedRequest.getHeader("User-Agent")
.matches("okhttp/\\d\\.\\d\\.\\d(-SNAPSHOT|-RC\\d+)?"));
.matches(Version.userAgent()));
}

@Test public void setFollowRedirectsFalse() throws Exception {
Expand Down

0 comments on commit 6a95936

Please sign in to comment.