Starts fixing up integration tests

This commit is contained in:
Shannon
2020-04-03 13:16:01 +11:00
parent 4349115f0d
commit 60abdd60b5
14 changed files with 162 additions and 121 deletions

View File

@@ -89,7 +89,7 @@ namespace Umbraco.Web.Common.AspNetCore
public string ToAbsolute(string virtualPath)
{
if (!virtualPath.StartsWith("~/") && !virtualPath.StartsWith("/"))
throw new InvalidOperationException($"{nameof(virtualPath)} must start with ~/ or /");
throw new InvalidOperationException($"The value {virtualPath} for parameter {nameof(virtualPath)} must start with ~/ or /");
// will occur if it starts with "/"
if (Uri.IsWellFormedUriString(virtualPath, UriKind.Absolute))

View File

@@ -9,6 +9,11 @@ namespace Umbraco.Web.Common.RuntimeMinification
{
public void Compose(Composition composition)
{
// TODO: For this to work we need to have services.AddSmidge() based on the Smidge APIs but our composer APIs don't really let us do that
// This makes it a bit awkward to boot the runtime since that call would need to be made outside of the composer... .hrm...
composition.RegisterUnique<IRuntimeMinifier, SmidgeRuntimeMinifier>();
composition.RegisterUnique<SmidgeHelperAccessor>();
}