fix tests without release titles (#14824)

This commit is contained in:
Bogdan 2023-11-06 18:49:15 +02:00 committed by GitHub
parent 5ba5207eb1
commit a4310e6d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 3 deletions

View File

@ -47,25 +47,33 @@ namespace Jackett.Test.Common.Indexers
{
var indexer = new TestWebIndexer();
indexer.AddTestCategories();
var results = new List<ReleaseInfo>
{
new ReleaseInfo
{
Title = "Release 1",
Category = new List<int> { TorznabCatType.Movies.ID }
},
new ReleaseInfo
{
Title = "Release 2",
Category = new List<int> { TorznabCatType.MoviesSD.ID }
},
new ReleaseInfo
{
Title = "Release 3",
Category = new List<int> { TorznabCatType.BooksEBook.ID, 100004 } // torznab (mandatory) + custom cat
},
new ReleaseInfo
{
Title = "Release 4",
Category = new List<int> { TorznabCatType.AudioLossless.ID } // unsupported category in this indexer
},
new ReleaseInfo()
new ReleaseInfo
{
Title = "Release 5",
}
};
var query = new TorznabQuery(); // without categories
@ -105,10 +113,17 @@ namespace Jackett.Test.Common.Indexers
public void TestFilterResultsLimit()
{
var indexer = new TestWebIndexer();
var results = new List<ReleaseInfo>
{
new ReleaseInfo(),
new ReleaseInfo()
new ReleaseInfo
{
Title = "Release 1"
},
new ReleaseInfo
{
Title = "Release 2"
}
};
var query = new TorznabQuery();
@ -132,6 +147,7 @@ namespace Jackett.Test.Common.Indexers
{
new ReleaseInfo
{
Title = "Release",
PublishDate = new DateTime(3000, 1, 1) // future date
}
};
@ -155,6 +171,7 @@ namespace Jackett.Test.Common.Indexers
{
new ReleaseInfo
{
Title = "Release",
MagnetUri = new Uri("magnet:?xt=urn:btih:3333333333333333333333333333333333333333&dn=Title&tr=udp%3A%2F%2Ftracker.com%3A6969")
}
};