mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Profiles
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
This commit is contained in:
@@ -6,6 +6,7 @@ using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Core.Tv;
|
||||
using System.Linq;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.Datastore.SQLiteMigrationHelperTests
|
||||
{
|
||||
@@ -119,5 +120,23 @@ namespace NzbDrone.Core.Test.Datastore.SQLiteMigrationHelperTests
|
||||
newColumns.Values.Should().HaveSameCount(columns.Values);
|
||||
newIndexes.Should().Contain(i=>i.Column == "AirTime");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_create_indexes_with_the_same_uniqueness()
|
||||
{
|
||||
var columns = _subject.GetColumns("Series");
|
||||
var indexes = _subject.GetIndexes("Series");
|
||||
|
||||
var tempIndexes = indexes.JsonClone();
|
||||
|
||||
tempIndexes[0].Unique = false;
|
||||
tempIndexes[1].Unique = true;
|
||||
|
||||
_subject.CreateTable("Series_New", columns.Values, tempIndexes);
|
||||
var newIndexes = _subject.GetIndexes("Series_New");
|
||||
|
||||
newIndexes.Should().HaveSameCount(tempIndexes);
|
||||
newIndexes.ShouldAllBeEquivalentTo(tempIndexes, options => options.Excluding(o => o.IndexName).Excluding(o => o.Table));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user