mirror of
https://github.com/Radarr/Radarr
synced 2026-01-17 13:03:26 +01:00
* New: Release Profiles - UI Updates * New: Release Profiles - API Changes * New: Release Profiles - Test Updates * New: Release Profiles - Backend Updates * New: Interactive Artist Search * New: Change Montiored on Album Details Page * New: Show Duration on Album Details Page * Fixed: Manual Import not working if no albums are Missing * Fixed: Sort search input by sortTitle * Fixed: Queue columnLabel throwing JS error
32 lines
No EOL
1 KiB
C#
32 lines
No EOL
1 KiB
C#
using FluentAssertions;
|
|
using System.Linq;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.Languages;
|
|
using NzbDrone.Core.Test.Framework;
|
|
using NzbDrone.Core.Profiles.Languages;
|
|
|
|
namespace NzbDrone.Core.Test.Languages
|
|
{
|
|
[TestFixture]
|
|
public class LanguageProfileRepositoryFixture : DbTest<LanguageProfileRepository, LanguageProfile>
|
|
{
|
|
[Test]
|
|
public void should_be_able_to_read_and_write()
|
|
{
|
|
var profile = new LanguageProfile
|
|
{
|
|
Languages = Language.All.OrderByDescending(l => l.Name).Select(l => new LanguageProfileItem {Language = l, Allowed = l == Language.English}).ToList(),
|
|
Name = "TestProfile",
|
|
Cutoff = Language.English
|
|
};
|
|
|
|
Subject.Insert(profile);
|
|
|
|
|
|
StoredModel.Name.Should().Be(profile.Name);
|
|
StoredModel.Cutoff.Should().Be(profile.Cutoff);
|
|
|
|
StoredModel.Languages.Should().Equal(profile.Languages, (a, b) => a.Language == b.Language && a.Allowed == b.Allowed);
|
|
}
|
|
}
|
|
} |