mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-01-02 12:30:14 +01:00
Fix SystemTime Fixture Failure
This commit is contained in:
@@ -6,6 +6,7 @@ using NzbDrone.Common.Cloud;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.HealthCheck.Checks;
|
||||
using NzbDrone.Core.Localization;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
@@ -24,6 +25,10 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
||||
{
|
||||
var json = new ServiceTimeResponse { DateTimeUtc = dateTime }.ToJson();
|
||||
|
||||
Mocker.GetMock<ILocalizationService>()
|
||||
.Setup(s => s.GetLocalizedString(It.IsAny<string>()))
|
||||
.Returns("System time is off by more than 1 day. Scheduled tasks may not run correctly until the time is corrected");
|
||||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(s => s.Execute(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), Encoding.ASCII.GetBytes(json)));
|
||||
|
||||
Reference in New Issue
Block a user