diff options
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs b/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs index 3cfe3a2..11463c7 100644 --- a/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs @@ -16,6 +16,7 @@ namespace DotNetOpenAuth.Test.OpenId { using DotNetOpenAuth.OpenId.Provider; using DotNetOpenAuth.OpenId.RelyingParty; using NUnit.Framework; + using System.Net; [TestFixture] public class NonIdentityTests : OpenIdTestBase { @@ -70,10 +71,11 @@ namespace DotNetOpenAuth.Test.OpenId { request.IsExtensionOnly = true; var redirectRequest = await request.GetRedirectingResponseAsync(); Uri redirectResponseUrl; + this.HostFactories.AllowAutoRedirects = false; using (var httpClient = this.HostFactories.CreateHttpClient()) { using (var redirectResponse = await httpClient.GetAsync(redirectRequest.Headers.Location)) { - redirectResponse.EnsureSuccessStatusCode(); - redirectResponseUrl = redirectRequest.Headers.Location; + Assert.That(redirectResponse.StatusCode, Is.EqualTo(HttpStatusCode.Redirect)); + redirectResponseUrl = redirectResponse.Headers.Location; } } |