1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

New: IMDb List Support

This commit is contained in:
Qstick
2022-11-24 21:15:20 -06:00
parent ea7af03d69
commit 381834edce
14 changed files with 290 additions and 26 deletions
@@ -1,6 +1,7 @@
using FluentAssertions;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.MetadataSource;
using NzbDrone.Core.MetadataSource.SkyHook;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
@@ -42,6 +43,30 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook
ExceptionVerification.IgnoreWarns();
}
[TestCase("tt0496424", "30 Rock")]
public void should_search_by_imdb(string title, string expected)
{
var result = Subject.SearchForNewSeriesByImdbId(title);
result.Should().NotBeEmpty();
result[0].Title.Should().Be(expected);
ExceptionVerification.IgnoreWarns();
}
[TestCase("4565se")]
public void should_not_search_by_imdb_if_invalid(string title)
{
var result = Subject.SearchForNewSeriesByImdbId(title);
result.Should().BeEmpty();
Mocker.GetMock<ISearchForNewSeries>()
.Verify(v => v.SearchForNewSeries(It.IsAny<string>()), Times.Never());
ExceptionVerification.IgnoreWarns();
}
[TestCase("tvdbid:")]
[TestCase("tvdbid: 99999999999999999999")]
[TestCase("tvdbid: 0")]