diff options
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); |