Adds test for PerformScheduledPublish, fixes issues with resetting dirty props, fixes other issues found

This commit is contained in:
Shannon
2018-11-07 21:32:12 +11:00
parent df40a3d588
commit adf52425d2
8 changed files with 125 additions and 35 deletions

View File

@@ -147,11 +147,9 @@ namespace Umbraco.Core.Models
/// <param name="changeType"></param>
/// <param name="date"></param>
/// <returns></returns>
public IEnumerable<ContentSchedule> GetPending(ContentScheduleChange changeType, DateTime date)
public IReadOnlyList<ContentSchedule> GetPending(ContentScheduleChange changeType, DateTime date)
{
if (_schedule.TryGetValue(string.Empty, out var changes))
return changes.Values.Where(x => x.Date <= date);
return Enumerable.Empty<ContentSchedule>();
return _schedule.Values.SelectMany(x => x.Values).Where(x => x.Date <= date).ToList();
}
/// <summary>