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