Improve document schedule (#17535)

* Expose schedule date for on document get endpoint

* typo fix

* stupid stuff

* Enable content scheduling features in the publishing service

* Replace obsoleted non async calls

* Add content scheduling test

* Publush and schedule combination test

* More invariantCulture notation allignment and more tests

* Link up api with updated document scheduling

* More invariant culture notation allignment

* Fix breaking change

* Return expected status codes.

* Fix constructor

* Forward Default implementation to actual core implementation

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Forward default implementation to core implementation

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Make content with scheduling retrieval scope safe

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Sven Geusens
2025-01-08 12:39:34 +01:00
committed by GitHub
parent 413398afc6
commit e425f0ba41
26 changed files with 2045 additions and 40 deletions

View File

@@ -3,6 +3,7 @@
using System.Linq;
using NUnit.Framework;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.Models;
@@ -44,7 +45,7 @@ public class ContentScheduleTests
var now = DateTime.Now;
var schedule = new ContentScheduleCollection();
schedule.Add(now, null);
var invariantSched = schedule.GetSchedule(string.Empty);
var invariantSched = schedule.GetSchedule(Constants.System.InvariantCulture);
schedule.Remove(invariantSched.First());
Assert.AreEqual(0, schedule.FullSchedule.Count());
}
@@ -56,7 +57,7 @@ public class ContentScheduleTests
var schedule = new ContentScheduleCollection();
schedule.Add(now, null);
schedule.Add("en-US", now, null);
var invariantSched = schedule.GetSchedule(string.Empty);
var invariantSched = schedule.GetSchedule(Constants.System.InvariantCulture);
schedule.Remove(invariantSched.First());
Assert.AreEqual(0, schedule.GetSchedule(string.Empty).Count());
Assert.AreEqual(1, schedule.FullSchedule.Count());