mirror of
https://github.com/Radarr/Radarr
synced 2024-12-22 07:52:34 +00:00
fixup! Remove db calls from list threads
This commit is contained in:
parent
b279984bd7
commit
200be6451a
1 changed files with 0 additions and 15 deletions
|
@ -7,8 +7,6 @@
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NzbDrone.Core.ImportLists;
|
using NzbDrone.Core.ImportLists;
|
||||||
using NzbDrone.Core.ImportLists.ImportListMovies;
|
using NzbDrone.Core.ImportLists.ImportListMovies;
|
||||||
using NzbDrone.Core.MetadataSource;
|
|
||||||
using NzbDrone.Core.Movies;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.ImportListTests
|
namespace NzbDrone.Core.Test.ImportListTests
|
||||||
|
@ -36,10 +34,6 @@ public void Setup()
|
||||||
|
|
||||||
_listMovies = Builder<ImportListMovie>.CreateListOfSize(5)
|
_listMovies = Builder<ImportListMovie>.CreateListOfSize(5)
|
||||||
.Build().ToList();
|
.Build().ToList();
|
||||||
|
|
||||||
Mocker.GetMock<ISearchForNewMovie>()
|
|
||||||
.Setup(v => v.MapMovieToTmdbMovie(It.IsAny<MovieMetadata>()))
|
|
||||||
.Returns<MovieMetadata>(m => new MovieMetadata { TmdbId = m.TmdbId });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GivenList(int id, bool enabled, bool enabledAuto, ImportListFetchResult fetchResult)
|
private void GivenList(int id, bool enabled, bool enabledAuto, ImportListFetchResult fetchResult)
|
||||||
|
@ -135,9 +129,6 @@ public void should_store_movies_if_list_doesnt_fail()
|
||||||
|
|
||||||
var listResult = Subject.Fetch();
|
var listResult = Subject.Fetch();
|
||||||
listResult.AnyFailure.Should().BeFalse();
|
listResult.AnyFailure.Should().BeFalse();
|
||||||
|
|
||||||
Mocker.GetMock<IImportListMovieService>()
|
|
||||||
.Verify(v => v.SyncMoviesForList(It.IsAny<List<ImportListMovie>>(), listId), Times.Once());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -149,9 +140,6 @@ public void should_not_store_movies_if_list_fails()
|
||||||
|
|
||||||
var listResult = Subject.Fetch();
|
var listResult = Subject.Fetch();
|
||||||
listResult.AnyFailure.Should().BeTrue();
|
listResult.AnyFailure.Should().BeTrue();
|
||||||
|
|
||||||
Mocker.GetMock<IImportListMovieService>()
|
|
||||||
.Verify(v => v.SyncMoviesForList(It.IsAny<List<ImportListMovie>>(), listId), Times.Never());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -166,9 +154,6 @@ public void should_only_store_movies_for_lists_that_dont_fail()
|
||||||
|
|
||||||
var listResult = Subject.Fetch();
|
var listResult = Subject.Fetch();
|
||||||
listResult.AnyFailure.Should().BeTrue();
|
listResult.AnyFailure.Should().BeTrue();
|
||||||
|
|
||||||
Mocker.GetMock<IImportListMovieService>()
|
|
||||||
.Verify(v => v.SyncMoviesForList(It.IsAny<List<ImportListMovie>>(), passedListId), Times.Once());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
Loading…
Reference in a new issue