1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00
This commit is contained in:
Mark McDowall
2017-02-10 22:46:39 -08:00
committed by Taloth Saldono
parent 211f3769e1
commit 7297c1b8e4
399 changed files with 10618 additions and 1043 deletions
@@ -1,7 +1,9 @@
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.MetadataSource.SkyHook;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
using NzbDrone.Test.Common;
using NzbDrone.Test.Common.Categories;
@@ -52,5 +54,24 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook
ExceptionVerification.IgnoreWarns();
}
[TestCase("tvdbid:78804")]
[TestCase("Doctor Who")]
public void should_return_existing_series_if_found(string term)
{
const int tvdbId = 78804;
var existingSeries = new Series
{
TvdbId = tvdbId
};
Mocker.GetMock<ISeriesService>().Setup(c => c.FindByTvdbId(tvdbId)).Returns(existingSeries);
var result = Subject.SearchForNewSeries("tvdbid: " + tvdbId);
result.Should().Contain(existingSeries);
result.Should().ContainSingle(c => c.TvdbId == tvdbId);
}
}
}