1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

Fixed: Parsing of special episodes that lack a series title

Closes #4688
This commit is contained in:
Mark McDowall
2021-10-17 21:36:26 -07:00
parent a83ed3bcce
commit a97e83ea4d
2 changed files with 30 additions and 9 deletions
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions.Equivalency;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Extensions;
@@ -28,6 +29,10 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
new Mock<IAggregateLocalEpisode>()
};
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetEpisodes(It.IsAny<ParsedEpisodeInfo>(), _series, It.IsAny<bool>(), null))
.Returns(Builder<Episode>.CreateListOfSize(1).BuildList());
Mocker.SetConstant(augmenters.Select(c => c.Object));
}
@@ -140,6 +145,10 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
Series = _series
};
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetEpisodes(fileEpisodeInfo, _series, It.IsAny<bool>(), null))
.Returns(new List<Episode>());
Mocker.GetMock<IParsingService>()
.Setup(s => s.ParseSpecialEpisodeTitle(fileEpisodeInfo, It.IsAny<string>(), _series))
.Returns(specialEpisodeInfo);