mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
New: Refresh button on book page that bypasses cache
This commit is contained in:
@@ -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>()
|
||||
|
||||
Reference in New Issue
Block a user