Last active
June 6, 2017 20:55
-
-
Save zbartl/6cd91dc44fbfc97cc394cd324fefed5a to your computer and use it in GitHub Desktop.
aspnetcore integration testing - test
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 async Task Should_be_able_to_see_secret() | |
{ | |
var data = new Dictionary<string, string>() | |
{ | |
{ "email", "test@gmail.com" }, | |
{ "secret", "shh!" } | |
}; | |
var secretContent = new FormUrlEncodedContent(data); | |
var result = await Client.PostAsync("/secret-thing", secretContent); | |
result.Headers.Location.ToString().ShouldBe("/thing-that-is-secret"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment