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

Fixed all tests and even added some new ones :) (#835)

* First fixing of tests.

* Updated more tests.

* Fix some tests

* Fix all prioritization tests.

And add new for preferred words.

* Updated CompletedDownloadservice tests

* Fixed a lot of tests

* Fixed all indexer requests. We should add more for the indexers we added.

To lazy for that though ¯\_(ツ)_/¯

* Fixed organizer tests.

Should probably be also updated to incorporate our newly added tags.

* Fix notification tests.

* Fixed update test for osx

* Fixed a few more tests.

* Fixed some more tests.

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update appveyor.yml

* Update activity.less

* Update appveyor.yml

* Update appveyor.yml

* Update CommonVersionInfo.cs

* Update build-appveyor.cake

Let's hope this works.

* Update CommonVersionInfo.cs

Just to kickstart appveyor

* Fixed a few tests

* Just ignore those tests.

* Fixed more tests.

* First steps in fixing Core.Test.Download.DownloadApprovedFixture

* Fix most DownloadApprovedFixture tests

* Fixed something.

* Fixed a few more tests.

* Fixed pending release tests.

* All Core tests are now fixed.

* Fixed the last tests :)

* Fixed Download Station Tests.

* Fixed Vuze and Transmission default settings which caused the tests to fail.

* Fix most tests.

* Fix RootFolder tests.

* Fixed last tests
This commit is contained in:
Leonardo Galli
2017-03-06 22:23:25 +01:00
committed by GitHub
parent 5bd008f468
commit 7cfa0531dc
74 changed files with 801 additions and 1094 deletions
@@ -20,8 +20,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
public class RemoveGrabbedFixture : CoreTest<PendingReleaseService>
{
private DownloadDecision _temporarilyRejected;
private Movie _series;
private Episode _episode;
private Movie _movie;
private Profile _profile;
private ReleaseInfo _release;
private ParsedMovieInfo _parsedEpisodeInfo;
@@ -30,7 +29,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
[SetUp]
public void Setup()
{
_series = Builder<Movie>.CreateNew()
_movie = Builder<Movie>.CreateNew()
.Build();
_profile = new Profile
@@ -45,7 +44,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
},
};
_series.Profile = new LazyLoaded<Profile>(_profile);
_movie.Profile = new LazyLoaded<Profile>(_profile);
_release = Builder<ReleaseInfo>.CreateNew().Build();
@@ -54,7 +53,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
_remoteEpisode = new RemoteMovie();
//_remoteEpisode.Episodes = new List<Episode>{ _episode };
_remoteEpisode.Movie = _series;
_remoteEpisode.Movie = _movie;
_remoteEpisode.ParsedMovieInfo = _parsedEpisodeInfo;
_remoteEpisode.Release = _release;
@@ -66,7 +65,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
Mocker.GetMock<IMovieService>()
.Setup(s => s.GetMovie(It.IsAny<int>()))
.Returns(_series);
.Returns(_movie);
//Mocker.GetMock<IParsingService>()
// .Setup(s => s.GetMovie(It.IsAny<ParsedMovieInfo>(), _series.Title))
@@ -84,9 +83,9 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
var heldReleases = Builder<PendingRelease>.CreateListOfSize(1)
.All()
.With(h => h.SeriesId = _series.Id)
.With(h => h.MovieId = _movie.Id)
.With(h => h.Release = _release.JsonClone())
.With(h => h.ParsedMovieInfo = _parsedEpisodeInfo)
.With(h => h.ParsedMovieInfo = parsedEpisodeInfo)
.Build();
Mocker.GetMock<IPendingReleaseRepository>()