1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Integration.Test/ReleaseIntegrationTest.cs

35 lines
1.0 KiB
C#
Raw Normal View History

using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Api.Indexers;
namespace NzbDrone.Integration.Test
{
[TestFixture]
public class ReleaseIntegrationTest : IntegrationTest
{
[Test]
public void should_only_have_unknown_series_releases()
{
var releases = Releases.All();
releases.Should().OnlyContain(c => c.Rejections.Contains("Unknown Series"));
releases.Should().OnlyContain(c=>BeValidRelease(c));
}
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();
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);
return true;
}
}
}