mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
Quality Order can now be change on per Quality Profile. Quality Title used in Renaming can now be changed by the user. Both options require Advanced Settings to be enabled.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using FluentAssertions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.Test.Qualities
|
||||
{
|
||||
[TestFixture]
|
||||
public class QualityDefinitionRepositoryFixture : DbTest<QualityDefinitionRepository, QualityDefinition>
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
foreach (var qualityDefault in Quality.DefaultQualityDefinitions)
|
||||
{
|
||||
qualityDefault.Id = 0;
|
||||
Storage.Insert(qualityDefault);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_get_qualitydefinition_by_id()
|
||||
{
|
||||
var size = Subject.GetByQualityId((int)Quality.Bluray1080p);
|
||||
|
||||
size.Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_throw_with_id_if_not_exist()
|
||||
{
|
||||
var id = 123;
|
||||
Assert.Throws<ModelNotFoundException>(()=> Subject.GetByQualityId(id)).Message.Contains(id.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user