mirror of https://github.com/Squidex/squidex.git
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.
39 lines
1.2 KiB
39 lines
1.2 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using FakeItEasy;
|
|
using tusdotnet.Interfaces;
|
|
using Xunit;
|
|
|
|
namespace Squidex.Domain.Apps.Entities.Assets
|
|
{
|
|
public class AssetCleanupProcessTests
|
|
{
|
|
private readonly ITusExpirationStore expirationStore = A.Fake<ITusExpirationStore>();
|
|
private readonly AssetCleanupProcess sut;
|
|
|
|
public AssetCleanupProcessTests()
|
|
{
|
|
sut = new AssetCleanupProcess(expirationStore);
|
|
}
|
|
|
|
[Fact]
|
|
public async Task Should_stop_when_start_not_called()
|
|
{
|
|
await sut.StopAsync(default);
|
|
}
|
|
|
|
[Fact]
|
|
public async Task Should_call_expiration_store_when_reminder_invoked()
|
|
{
|
|
await sut.CleanupAsync(default);
|
|
|
|
A.CallTo(() => expirationStore.RemoveExpiredFilesAsync(default))
|
|
.MustHaveHappened();
|
|
}
|
|
}
|
|
}
|
|
|