mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
Fix: NzbMatrix report age is now parsed properly.
This commit is contained in:
parent
4d918ff683
commit
6375df058e
2 changed files with 21 additions and 0 deletions
|
@ -440,6 +440,24 @@ namespace NzbDrone.Core.Test
|
|||
parseResults.Should().NotContain(s => s.NzbUrl.Contains("details"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void nzbmatrix_should_use_age_from_custom()
|
||||
{
|
||||
WithConfiguredIndexers();
|
||||
|
||||
var expectedAge = DateTime.Now.Subtract(new DateTime(2011, 4, 25, 15, 6, 58)).Days;
|
||||
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
|
||||
.Returns(File.OpenRead(".\\Files\\Rss\\SizeParsing\\nzbmatrix.xml"));
|
||||
|
||||
//Act
|
||||
var parseResults = Mocker.Resolve<NzbMatrix>().FetchRss();
|
||||
|
||||
parseResults.Should().HaveCount(1);
|
||||
parseResults[0].Age.Should().Be(expectedAge);
|
||||
}
|
||||
|
||||
private static void Mark500Inconclusive()
|
||||
{
|
||||
ExceptionVerification.MarkInconclusive(typeof(WebException));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue