1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00

Fixing scene mappings

This commit is contained in:
Mark McDowall 2015-04-23 06:36:51 -07:00
parent 2feb583e45
commit ecd941a6e5
2 changed files with 4 additions and 4 deletions

View File

@ -136,13 +136,13 @@ public void should_not_refresh_cache_if_cache_is_not_empty_when_looking_for_tvdb
}
[Test]
public void should_not_add_mapping_with_blank_parse_title()
public void should_not_add_mapping_with_blank_title()
{
GivenProviders(new[] { _provider1 });
var fakeMappings = Builder<SceneMapping>.CreateListOfSize(2)
.TheLast(1)
.With(m => m.ParseTerm = null)
.With(m => m.Title = null)
.Build()
.ToList();
@ -152,7 +152,7 @@ public void should_not_add_mapping_with_blank_parse_title()
Subject.Execute(new UpdateSceneMappingCommand());
Mocker.GetMock<ISceneMappingRepository>().Verify(c => c.InsertMany(It.Is<IList<SceneMapping>>(m => !m.Any(s => s.ParseTerm.IsNullOrWhiteSpace()))), Times.Once());
Mocker.GetMock<ISceneMappingRepository>().Verify(c => c.InsertMany(It.Is<IList<SceneMapping>>(m => !m.Any(s => s.Title.IsNullOrWhiteSpace()))), Times.Once());
ExceptionVerification.ExpectedWarns(1);
}

View File

@ -114,7 +114,7 @@ private void UpdateMappings()
mappings.RemoveAll(sceneMapping =>
{
if (sceneMapping.ParseTerm.IsNullOrWhiteSpace() ||
if (sceneMapping.Title.IsNullOrWhiteSpace() ||
sceneMapping.SearchTerm.IsNullOrWhiteSpace())
{
_logger.Warn("Invalid scene mapping found for: {0}, skipping", sceneMapping.TvdbId);