Skip to content

Commit 456b8a8

Browse files
committed
Fixed test now that save of content types creates a cleanup policy
1 parent ab06d21 commit 456b8a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Umbraco.Tests/Services/ContentVersionCleanupService_Tests_Integration.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public void PerformContentVersionCleanup_WithNoKeepPeriods_DeletesEverythingExce
2828
// With 11M Property data
2929

3030
var contentTypeA = MockedContentTypes.CreateSimpleContentType("contentTypeA", "contentTypeA");
31+
// Kill all historic
32+
contentTypeA.HistoryCleanup.PreventCleanup = false;
33+
contentTypeA.HistoryCleanup.KeepAllVersionsNewerThanDays = 0;
34+
contentTypeA.HistoryCleanup.KeepLatestVersionPerDayForDays = 0;
35+
3136
ServiceContext.FileService.SaveTemplate(contentTypeA.DefaultTemplate);
3237
ServiceContext.ContentTypeService.Save(contentTypeA);
3338

@@ -44,8 +49,7 @@ public void PerformContentVersionCleanup_WithNoKeepPeriods_DeletesEverythingExce
4449
Debug.Assert(before.ContentVersions == 12); // 10 historic + current draft + current published
4550
Debug.Assert(before.PropertyData == 12 * 3); // CreateSimpleContentType = 3 props
4651

47-
// Kill all historic
48-
InsertCleanupPolicy(contentTypeA, 0, 0);
52+
4953

5054
((IContentVersionService)ServiceContext.ContentService).PerformContentVersionCleanup(DateTime.Now.AddHours(1));
5155

0 commit comments

Comments
 (0)