2013-04-28 19:46:13 +00:00
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using NUnit.Framework;
|
2013-04-29 00:39:17 +00:00
|
|
|
|
using NzbDrone.Api.Indexers;
|
2013-04-28 19:46:13 +00:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Integration.Test
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class ReleaseIntegrationTest : IntegrationTest
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_only_have_unknown_series_releases()
|
|
|
|
|
{
|
2013-04-29 00:39:17 +00:00
|
|
|
|
var releases = Releases.All();
|
|
|
|
|
|
|
|
|
|
releases.Should().OnlyContain(c => c.Rejections.Contains("Unknown Series"));
|
|
|
|
|
releases.Should().OnlyContain(c=>BeValidRelease(c));
|
2013-04-28 19:46:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2013-04-29 00:39:17 +00:00
|
|
|
|
|
|
|
|
|
private bool BeValidRelease(ReleaseResource releaseResource)
|
|
|
|
|
{
|
|
|
|
|
releaseResource.Age.Should().BeGreaterOrEqualTo(-1);
|
|
|
|
|
releaseResource.Title.Should().NotBeBlank();
|
2013-09-13 23:17:58 +00:00
|
|
|
|
releaseResource.DownloadUrl.Should().NotBeBlank();
|
2013-04-29 00:39:17 +00:00
|
|
|
|
releaseResource.SeriesTitle.Should().NotBeBlank();
|
2013-05-03 04:37:08 +00:00
|
|
|
|
//TODO: uncomment these after moving to restsharp for rss
|
|
|
|
|
//releaseResource.NzbInfoUrl.Should().NotBeBlank();
|
|
|
|
|
//releaseResource.Size.Should().BeGreaterThan(0);
|
2013-04-29 00:39:17 +00:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-28 19:46:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|