Skip to content

Commit df70ca8

Browse files
author
Kenneth Jakobsen
committed
Fixed tests
1 parent 033972c commit df70ca8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/UmbracoFileSystemProviders.Azure.Tests/InstallerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void CheckXdtFirstParameterKey()
2525
public void CheckXdtNumberOfParameters()
2626
{
2727
var parameters = InstallerController.GetParametersFromXml("FileSystemProviders.config.install.xdt");
28-
Assert.AreEqual(4, parameters.Count());
28+
Assert.AreEqual(5, parameters.Count());
2929
}
3030

3131
[Test]

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,19 @@ private AzureFileSystem(string containerName, string rootUrl, string connectionS
116116
rootUrl = rootUrl.Trim() + "/";
117117
}
118118

119-
if (!cdnUrl.Trim().EndsWith("/"))
119+
if (!string.IsNullOrEmpty(cdnUrl))
120120
{
121-
cdnUrl = cdnUrl.Trim() + "/";
121+
if (!cdnUrl.Trim().EndsWith("/"))
122+
{
123+
cdnUrl = cdnUrl.Trim() + "/";
124+
}
125+
126+
this.cdnUrl = cdnUrl + containerName + "/";
122127
}
123128

124129
this.rootUrl = rootUrl + containerName + "/";
125130
this.ContainerName = containerName;
126131
this.MaxDays = maxDays;
127-
this.cdnUrl = cdnUrl + containerName + "/";
128132
this.LogHelper = new WrappedLogHelper();
129133
this.MimeTypeResolver = new MimeTypeResolver();
130134
}

0 commit comments

Comments
 (0)