From e042388a977adf1b4667c42af2deb4ec013d890b Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 22 Sep 2017 18:18:00 -0700 Subject: [PATCH] Fixed subpack parsing tests --- .../ParserTests/SeasonParserFixture.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs index 43fc8cc37..7272d474b 100644 --- a/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs @@ -50,14 +50,18 @@ namespace NzbDrone.Core.Test.ParserTests result.IsSeasonExtra.Should().BeTrue(); } - [TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD")] - [TestCase("The.Middle.S02.SUBPACK.DVDRip.XviD-REWARD")] - [TestCase("CSI.S11.SUBPACK.DVDRip.XviD-REWARD")] - public void should_parse_season_subpack(string postTitle) + [TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD", "Lie to Me", 3)] + [TestCase("The.Middle.S02.SUBPACK.DVDRip.XviD-REWARD", "The Middle", 2)] + [TestCase("CSI.S11.SUBPACK.DVDRip.XviD-REWARD", "CSI", 11)] + public void should_parse_season_subpack(string postTitle, string title, int season) { var result = Parser.Parser.ParseTitle(postTitle); - - result.Should().BeNull(); + result.SeasonNumber.Should().Be(season); + result.SeriesTitle.Should().Be(title); + result.EpisodeNumbers.Should().BeEmpty(); + result.AbsoluteEpisodeNumbers.Should().BeEmpty(); + result.FullSeason.Should().BeTrue(); + result.IsSeasonExtra.Should().BeTrue(); } [TestCase("The.Ranch.2016.S02.Part.1.1080p.NF.WEBRip.DD5.1.x264-NTb", "The Ranch 2016", 2, 1)]