Fixed: xem mappings for series without scene mapping

pull/2/head
kayone 11 years ago
parent 7efac124c7
commit 0069b29f88

@ -46,14 +46,23 @@ namespace NzbDrone.Core.Test.Providers
}
[Test]
public void should_get_mapping()
[TestCase(82807)]
public void should_get_mapping(int seriesId)
{
var result = Subject.GetSceneTvdbMappings(82807);
var result = Subject.GetSceneTvdbMappings(seriesId);
result.Should().NotBeEmpty();
result.Should().OnlyContain(c => c.Scene != null);
result.Should().OnlyContain(c => c.Tvdb != null);
}
[TestCase(78916)]
public void should_filter_out_episodes_without_scene_mapping(int seriesId)
{
var result = Subject.GetSceneTvdbMappings(seriesId);
result.Should().NotContain(c => c.Tvdb == null);
}
}
}

@ -61,7 +61,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
var response = restClient.ExecuteAndValidate<XemResult<List<XemSceneTvdbMapping>>>(request);
CheckForFailureResult(response);
return response.Data;
return response.Data.Where(c => c.Scene != null).ToList();
}
private static void CheckForFailureResult<T>(XemResult<T> response)

Loading…
Cancel
Save