mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Added test for fix in last commit.
This commit is contained in:
parent
343d849536
commit
3790dc9109
@ -20,6 +20,8 @@ public class AcceptableSizeSpecificationFixture : CoreTest<AcceptableSizeSpecifi
|
||||
private RemoteEpisode parseResultMulti;
|
||||
private RemoteEpisode parseResultSingle;
|
||||
private Series series;
|
||||
private Movie movie;
|
||||
private RemoteMovie remoteMovie;
|
||||
private QualityDefinition qualityType;
|
||||
|
||||
[SetUp]
|
||||
@ -28,6 +30,16 @@ public void Setup()
|
||||
series = Builder<Series>.CreateNew()
|
||||
.Build();
|
||||
|
||||
movie = Builder<Movie>.CreateNew().Build();
|
||||
|
||||
remoteMovie = new RemoteMovie
|
||||
{
|
||||
Movie = movie,
|
||||
Release = new ReleaseInfo(),
|
||||
ParsedMovieInfo = new ParsedMovieInfo { Quality = new QualityModel(Quality.SDTV, new Revision(version: 2)) },
|
||||
|
||||
};
|
||||
|
||||
parseResultMultiSet = new RemoteEpisode
|
||||
{
|
||||
Series = series,
|
||||
@ -216,5 +228,17 @@ public void should_return_true_for_special()
|
||||
|
||||
Subject.IsSatisfiedBy(parseResultSingle, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_use_110_minutes_if_runtime_is_0()
|
||||
{
|
||||
movie.Runtime = 0;
|
||||
remoteMovie.Movie = movie;
|
||||
remoteMovie.Release.Size = 1095.Megabytes();
|
||||
|
||||
Subject.IsSatisfiedBy(remoteMovie, null).Accepted.Should().Be(true);
|
||||
remoteMovie.Release.Size = 1105.Megabytes();
|
||||
Subject.IsSatisfiedBy(remoteMovie, null).Accepted.Should().Be(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user