Get tests green

This commit is contained in:
Stephan
2017-09-22 15:23:46 +02:00
parent dca3b74542
commit c43bf6c741
38 changed files with 1139 additions and 642 deletions

View File

@@ -19,7 +19,11 @@ namespace Umbraco.Web.WebApi
/// <param name="request"></param>
/// <returns></returns>
internal static Attempt<IOwinContext> TryGetOwinContext(this HttpRequestMessage request)
{
{
// occurs in unit tests?
if (request.Properties.TryGetValue("MS_OwinContext", out var o) && o is IOwinContext owinContext)
return Attempt.Succeed(owinContext);
var httpContext = request.TryGetHttpContext();
try
{