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