public async Task Should_set_cookie_on_redirect(string path)
{
_handler.UseCookies = true;
using (var client = new HttpClient(_handler)
{
BaseAddress = new Uri("http://localhost")
})
{
var response = await client.GetAsync(path);
response.RequestMessage.Headers.GetValues("Cookie").Single().ShouldBe("foo=bar");
}
}
}