Created
May 3, 2012 18:51
-
-
Save skinny/2588082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void Should_return_null_response_with_RequiresAuthentication_enabled_for_POST_requests_and_hit_with_GET() | |
{ | |
var module = new FakeHookedModule(A.Fake<BeforePipeline>()); | |
module.RequiresAuthentication().For("POST"); | |
module.Get["/"] = _ => { return "GET"; }; | |
module.Post["/"] = _ => { return "POST"; }; | |
var bootstrapper = new ConfigurableBootstrapper(); | |
var browser = new Browser(bootstrapper); | |
var postResult = browser.Post("/"); | |
postResult.ShouldNotBeNull(); | |
postResult.StatusCode.ShouldEqual(HttpStatusCode.Unauthorized); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment