Fixed failing test and some flaky tests.

v2.0.0.5163
Taloth Saldono 6 years ago
parent e607a67f00
commit 52588509ed

@ -35,7 +35,7 @@ namespace NzbDrone.Core.Test.Housekeeping.Housekeepers
Mocker.GetMock<IDownloadClientStatusRepository>()
.Verify(v => v.UpdateMany(
It.Is<List<DownloadClientStatus>>(i => i.All(
s => s.DisabledTill.Value < DateTime.UtcNow.AddMinutes(disabledTillTime)))
s => s.DisabledTill.Value <= DateTime.UtcNow.AddMinutes(disabledTillTime)))
)
);
}

@ -137,6 +137,9 @@ namespace NzbDrone.Core.Test.Messaging.Commands
QueueAndWaitForExecution(commandModel);
VerifyEventPublished<CommandExecutedEvent>();
Thread.Sleep(10);
ExceptionVerification.ExpectedErrors(1);
}

@ -294,7 +294,7 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests
Mocker.GetMock<IEpisodeService>()
.Setup(s => s.FindEpisodesBySceneNumbering(It.IsAny<int>(), seasonNumber, It.IsAny<int>()))
.Returns(Builder<Episode>.CreateListOfSize(0).Build().ToList());
.Returns(new List<Episode>());
Subject.GetEpisodes(_parsedEpisodeInfo, _series, true, null);

@ -13,8 +13,11 @@ namespace NzbDrone.Mono.Test.EnvironmentInfo
[Test]
public void should_get_framework_version()
{
Subject.Version.Major.Should().Be(4);
Subject.Version.Minor.Should().BeOneOf(0, 5, 6);
Subject.Version.Major.Should().BeOneOf(4, 5);
if (Subject.Version.Major == 4)
{
Subject.Version.Minor.Should().BeOneOf(0, 5, 6);
}
}
}
}

Loading…
Cancel
Save