Ensures date comparisons in schedule integration tests are made only on the datetime part to the second (#18894)
* Ensures date comparisons in schedule integration tests are made only on the date part. * Include time part to the second. * Ensure Kind is retained when truncating a date. * Retain Kind for all truncation levels.
This commit is contained in:
committed by
Jacob Overgaard
parent
fc815db80b
commit
1720692d3d
@@ -1,4 +1,3 @@
|
||||
using Bogus.DataSets;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
@@ -23,8 +22,8 @@ public class ContentPublishingServiceTests : UmbracoIntegrationTestWithContent
|
||||
{
|
||||
private const string UnknownCulture = "ke-Ke";
|
||||
|
||||
private readonly DateTime _schedulePublishDate = DateTime.UtcNow.AddDays(1);
|
||||
private readonly DateTime _scheduleUnPublishDate = DateTime.UtcNow.AddDays(2);
|
||||
private readonly DateTime _schedulePublishDate = DateTime.UtcNow.AddDays(1).TruncateTo(DateTimeExtensions.DateTruncate.Second);
|
||||
private readonly DateTime _scheduleUnPublishDate = DateTime.UtcNow.AddDays(2).TruncateTo(DateTimeExtensions.DateTruncate.Second);
|
||||
|
||||
[SetUp]
|
||||
public new void Setup() => ContentRepositoryBase.ThrowOnWarning = true;
|
||||
|
||||
Reference in New Issue
Block a user