mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-27 23:06:29 -04:00
v3 API
This commit is contained in:
committed by
Taloth Saldono
parent
211f3769e1
commit
7297c1b8e4
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user