You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
790 B
30 lines
790 B
using Recyclarr.Cli.Pipelines.Tags;
|
|
using Recyclarr.Cli.Pipelines.Tags.PipelinePhases;
|
|
using Recyclarr.ServarrApi.Tag;
|
|
|
|
namespace Recyclarr.Cli.Tests.Pipelines.Tags.PipelinePhases;
|
|
|
|
[TestFixture]
|
|
public class TagApiFetchPhaseTest
|
|
{
|
|
[Test, AutoMockData]
|
|
public async Task Cache_is_updated(
|
|
[Frozen] ISonarrTagApiService api,
|
|
[Frozen] ServiceTagCache cache,
|
|
TagPipelineContext context,
|
|
TagApiFetchPhase sut)
|
|
{
|
|
var expectedData = new[]
|
|
{
|
|
new SonarrTag {Id = 3},
|
|
new SonarrTag {Id = 4},
|
|
new SonarrTag {Id = 5}
|
|
};
|
|
|
|
api.GetTags(default!).ReturnsForAnyArgs(expectedData);
|
|
|
|
await sut.Execute(context, default!);
|
|
cache.Tags.Should().BeEquivalentTo(expectedData);
|
|
}
|
|
}
|