mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fix SystemTime Fixture Failure
This commit is contained in:
parent
1a9d7c3c28
commit
695297435e
@ -6,6 +6,7 @@
|
|||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Common.Serializer;
|
using NzbDrone.Common.Serializer;
|
||||||
using NzbDrone.Core.HealthCheck.Checks;
|
using NzbDrone.Core.HealthCheck.Checks;
|
||||||
|
using NzbDrone.Core.Localization;
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
using NzbDrone.Test.Common;
|
using NzbDrone.Test.Common;
|
||||||
|
|
||||||
@ -24,6 +25,10 @@ private void GivenServerTime(DateTime dateTime)
|
|||||||
{
|
{
|
||||||
var json = new ServiceTimeResponse { DateTimeUtc = dateTime }.ToJson();
|
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>()
|
Mocker.GetMock<IHttpClient>()
|
||||||
.Setup(s => s.Execute(It.IsAny<HttpRequest>()))
|
.Setup(s => s.Execute(It.IsAny<HttpRequest>()))
|
||||||
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), Encoding.ASCII.GetBytes(json)));
|
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), Encoding.ASCII.GetBytes(json)));
|
||||||
|
Loading…
Reference in New Issue
Block a user