Skip to content

Commit 4882837

Browse files
committed
Fixed test
1 parent ef34fe5 commit 4882837

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentVersionCleanupServiceTest.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public void PerformContentVersionCleanup_WithNoKeepPeriods_DeletesEverythingExce
3838
FileService.SaveTemplate(template);
3939

4040
ContentType contentTypeA = ContentTypeBuilder.CreateSimpleContentType("contentTypeA", "contentTypeA", defaultTemplateId: template.Id);
41+
// Kill all historic
42+
contentTypeA.HistoryCleanup.PreventCleanup = false;
43+
contentTypeA.HistoryCleanup.KeepAllVersionsNewerThanDays = 0;
44+
contentTypeA.HistoryCleanup.KeepLatestVersionPerDayForDays = 0;
45+
46+
4147
ContentTypeService.Save(contentTypeA);
4248

4349
Content content = ContentBuilder.CreateSimpleContent(contentTypeA);
@@ -53,9 +59,6 @@ public void PerformContentVersionCleanup_WithNoKeepPeriods_DeletesEverythingExce
5359
Debug.Assert(before.ContentVersions == 12); // 10 historic + current draft + current published
5460
Debug.Assert(before.PropertyData == 12 * 3); // CreateSimpleContentType = 3 props
5561

56-
// Kill all historic
57-
InsertCleanupPolicy(contentTypeA, 0, 0);
58-
5962
ContentVersionService.PerformContentVersionCleanup(DateTime.Now.AddHours(1));
6063

6164
Report after = GetReport();

0 commit comments

Comments
 (0)