diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-10 19:41:22 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-10 19:41:22 -0700 |
commit | f96a41f00061266e6e0697dc144485b2747a039e (patch) | |
tree | 8dfae90449d791d3d0046763b26bbb32fe4fbec8 /src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs | |
parent | d8885566abfde1894a7aba9243c347d13aaa7155 (diff) | |
download | DotNetOpenAuth-f96a41f00061266e6e0697dc144485b2747a039e.zip DotNetOpenAuth-f96a41f00061266e6e0697dc144485b2747a039e.tar.gz DotNetOpenAuth-f96a41f00061266e6e0697dc144485b2747a039e.tar.bz2 |
Applied fix for HTTP verb enforcement required by OpenID 2.0 section 5.1.1.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs index ef8098e..c8f5cbe 100644 --- a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs @@ -34,6 +34,17 @@ namespace DotNetOpenAuth.Test.Messaging { this.ParameterizedReceiveTest("POST"); } + /// <summary> + /// Verifies compliance to OpenID 2.0 section 5.1.1 by verifying the channel + /// will reject messages that come with an unexpected HTTP verb. + /// </summary> + [TestMethod, ExpectedException(typeof(ProtocolException))] + public void ReadFromRequestDisallowedHttpMethod() { + var fields = GetStandardTestFields(FieldFill.CompleteBeforeBindings); + fields["GetOnly"] = "true"; + this.Channel.ReadFromRequest(CreateHttpRequestInfo("POST", fields)); + } + [TestMethod, ExpectedException(typeof(ArgumentNullException))] public void SendNull() { this.Channel.PrepareResponse(null); |