mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-19 22:04:56 -04:00
74a38415cf
Indexes are created with the same uniqueness when copying a table New: Non-English episode support New: Renamed Quality Profiles to Profiles and made them more powerful New: Configurable wait time before grabbing a release to wait for a better quality
41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
using System.Linq;
|
|
using FizzWare.NBuilder;
|
|
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
|
using NzbDrone.Core.Test.Framework;
|
|
using NzbDrone.Core.Tv;
|
|
|
|
namespace NzbDrone.Core.Test.Datastore.SQLiteMigrationHelperTests
|
|
{
|
|
[TestFixture]
|
|
public class DuplicateFixture : DbTest
|
|
{
|
|
private SqLiteMigrationHelper _subject;
|
|
|
|
[SetUp]
|
|
public void SetUp()
|
|
{
|
|
_subject = Mocker.Resolve<SqLiteMigrationHelper>();
|
|
}
|
|
|
|
|
|
[Test]
|
|
public void get_duplicates()
|
|
{
|
|
var series = Builder<Series>.CreateListOfSize(10)
|
|
.Random(3)
|
|
.With(c => c.ProfileId = 100)
|
|
.BuildListOfNew();
|
|
|
|
Db.InsertMany(series);
|
|
|
|
var duplicates = _subject.GetDuplicates<int>("series", "ProfileId").ToList();
|
|
|
|
|
|
duplicates.Should().HaveCount(1);
|
|
duplicates.First().Should().HaveCount(3);
|
|
}
|
|
|
|
}
|
|
} |