New: Refresh button on book page that bypasses cache

This commit is contained in:
ta264
2020-09-03 21:35:49 +01:00
parent b93bc1e5e5
commit 2f8ac793ff
11 changed files with 97 additions and 18 deletions
+2 -2
View File
@@ -32,8 +32,8 @@ namespace NzbDrone.Core.Test.Framework
var httpClient = Mocker.Resolve<IHttpClient>();
Mocker.GetMock<ICachedHttpResponseService>()
.Setup(x => x.Get(It.IsAny<HttpRequest>(), It.IsAny<TimeSpan>()))
.Returns((HttpRequest request, TimeSpan ttl) => httpClient.Get(request));
.Setup(x => x.Get(It.IsAny<HttpRequest>(), It.IsAny<bool>(), It.IsAny<TimeSpan>()))
.Returns((HttpRequest request, bool useCavhe, TimeSpan ttl) => httpClient.Get(request));
}
}
@@ -43,7 +43,7 @@ namespace NzbDrone.Core.Test.MusicTests
.Build();
Mocker.GetMock<IProvideBookInfo>()
.Setup(s => s.GetBookInfo(readarrId))
.Setup(s => s.GetBookInfo(readarrId, true))
.Returns(Tuple.Create(_fakeArtist.Metadata.Value.ForeignAuthorId,
_fakeAlbum,
new List<AuthorMetadata> { _fakeArtist.Metadata.Value }));
@@ -99,7 +99,7 @@ namespace NzbDrone.Core.Test.MusicTests
var newAlbum = AlbumToAdd("edition", "book", "author");
Mocker.GetMock<IProvideBookInfo>()
.Setup(s => s.GetBookInfo("edition"))
.Setup(s => s.GetBookInfo("edition", true))
.Throws(new BookNotFoundException("edition"));
Assert.Throws<ValidationException>(() => Subject.AddBook(newAlbum));
@@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.MusicTests
private void GivenValidArtist(string readarrId)
{
Mocker.GetMock<IProvideAuthorInfo>()
.Setup(s => s.GetAuthorInfo(readarrId))
.Setup(s => s.GetAuthorInfo(readarrId, true))
.Returns(_fakeArtist);
}
@@ -113,7 +113,7 @@ namespace NzbDrone.Core.Test.MusicTests
};
Mocker.GetMock<IProvideAuthorInfo>()
.Setup(s => s.GetAuthorInfo(newArtist.ForeignAuthorId))
.Setup(s => s.GetAuthorInfo(newArtist.ForeignAuthorId, true))
.Throws(new AuthorNotFoundException(newArtist.ForeignAuthorId));
Mocker.GetMock<IAddAuthorValidator>()