1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-23 22:25:14 -04:00

New: Allow Selection Original Movie Languge in Profile

This commit is contained in:
Qstick
2020-09-08 23:13:42 -04:00
parent e880eb0e00
commit 53eeee8b91
9 changed files with 105 additions and 17 deletions
@@ -30,7 +30,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Profile = new Profile
{
Language = Language.English
}
},
OriginalLanguage = Language.French
}
};
}
@@ -45,6 +46,11 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
_remoteMovie.ParsedMovieInfo.Languages = new List<Language> { Language.German };
}
private void WithFrenchRelease()
{
_remoteMovie.ParsedMovieInfo.Languages = new List<Language> { Language.French };
}
[Test]
public void should_return_true_if_language_is_english()
{
@@ -61,6 +67,26 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(_remoteMovie, null).Accepted.Should().BeFalse();
}
[Test]
public void should_return_false_if_release_is_german_and_profile_original()
{
_remoteMovie.Movie.Profile.Language = Language.Original;
WithGermanRelease();
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(_remoteMovie, null).Accepted.Should().BeFalse();
}
[Test]
public void should_return_true_if_release_is_french_and_profile_original()
{
_remoteMovie.Movie.Profile.Language = Language.Original;
WithFrenchRelease();
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(_remoteMovie, null).Accepted.Should().BeTrue();
}
[Test]
public void should_return_true_if_allowed_language_any()
{