mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
re-adding indexes for series/episodes.
This commit is contained in:
parent
c90a96c2e0
commit
9390a00f80
19 changed files with 308 additions and 78 deletions
|
@ -0,0 +1,42 @@
|
|||
using System.Collections.Generic;
|
||||
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.QualityProfileId = 100)
|
||||
.BuildListOfNew();
|
||||
|
||||
Db.InsertMany(series);
|
||||
|
||||
var duplicates = _subject.GetDuplicates<int>("series", "QualityProfileId").ToList();
|
||||
|
||||
|
||||
duplicates.Should().HaveCount(1);
|
||||
duplicates.First().Should().HaveCount(3);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue