added preview cancellation rethrow test

This commit is contained in:
Flaminel committed 2026-10-21 21:33:19 +03:00
1 parent 063698cade
commit ffaf2edac8
1 file changed
+12
@@ -407,4 +407,16 @@ public class SeekerPreviewControllerTests : IDisposable
response.NextUp.ShouldHaveSingleItem();
response.RandomPick.ShouldBeFalse();
}
[Fact]
public async Task GetPreview_QueueReadCancelled_Rethrows()
{
ArrInstance radarr = AddRadarr();
SetupMovies(Movie(1));
_arrQueueReader.ReadAllAsync(Arg.Any<IArrClient>(), Arg.Any<ArrInstance>())
.ThrowsAsync(new OperationCanceledException());
await Should.ThrowAsync<OperationCanceledException>(
() => _controller.GetPreview(radarr.Id, CancellationToken.None));
}
}