Headless CMS and Content Managment Hub
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

// ==========================================================================
// 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 AssetCleanupGrainTests
{
private readonly ITusExpirationStore expirationStore = A.Fake<ITusExpirationStore>();
private readonly AssetCleanupGrain sut;
public AssetCleanupGrainTests()
{
sut = new AssetCleanupGrain(expirationStore);
}
[Fact]
public async Task Should_do_nothing_on_activate()
{
await sut.ActivateAsync();
}
[Fact]
public async Task Should_call_expiration_store_when_reminder_invoked()
{
await sut.ReceiveReminder("Reminder", default);
A.CallTo(() => expirationStore.RemoveExpiredFilesAsync(default))
.MustHaveHappened();
}
}
}