Fixed test failure reported on CI
This commit is contained in:
@@ -211,7 +211,9 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="icon">The application icon, which has to be located in umbraco/images/tray folder.</param>
|
||||
public void MakeNew(string name, string alias, string icon)
|
||||
{
|
||||
MakeNew(name, alias, icon, GetSections().Max(x => x.SortOrder) + 1);
|
||||
var sections = GetSections();
|
||||
var nextSortOrder = sections != null ? GetSections().Max(x => x.SortOrder) + 1 : 1;
|
||||
MakeNew(name, alias, icon, nextSortOrder);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Umbraco.Tests.Services
|
||||
ServiceContext.SectionService.MakeNew("Settings", "settings", "icon-settings");
|
||||
ServiceContext.SectionService.MakeNew("Developer", "developer", "icon-developer");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SectionService_Can_Get_Allowed_Sections_For_User()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user