File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tests/Umbraco.Tests.Integration/Umbraco.Core/Services Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -687,6 +687,25 @@ public void Can_Get_Content_For_Expiration()
687
687
Assert . That ( contents . Count ( ) , Is . EqualTo ( 1 ) ) ;
688
688
}
689
689
690
+ [ Test ]
691
+ public void Can_Get_Scheduled_Content_Keys ( )
692
+ {
693
+ // Arrange
694
+ var root = ContentService . GetById ( Textpage . Id ) ;
695
+ ContentService . Publish ( root ! , root ! . AvailableCultures . ToArray ( ) ) ;
696
+ var content = ContentService . GetById ( Subpage . Id ) ;
697
+ var contentSchedule = ContentScheduleCollection . CreateWithEntry ( DateTime . UtcNow . AddDays ( 1 ) , null ) ;
698
+ ContentService . PersistContentSchedule ( content ! , contentSchedule ) ;
699
+ ContentService . Publish ( content , content . AvailableCultures . ToArray ( ) ) ;
700
+
701
+ // Act
702
+ var keys = ContentService . GetScheduledContentKeys ( [ Textpage . Key , Subpage . Key , Subpage2 . Key ] ) . ToList ( ) ;
703
+
704
+ // Assert
705
+ Assert . AreEqual ( 1 , keys . Count ) ;
706
+ Assert . AreEqual ( Subpage . Key , keys . First ( ) ) ;
707
+ }
708
+
690
709
[ Test ]
691
710
public void Can_Get_Content_For_Release ( )
692
711
{
You can’t perform that action at this time.
0 commit comments