Browse Source

Add test

pull/19380/head
Salih 3 years ago
parent
commit
874dd5649d
  1. 11
      modules/docs/test/Volo.Docs.TestBase/Volo/Docs/DocumentRepository_Tests.cs

11
modules/docs/test/Volo.Docs.TestBase/Volo/Docs/DocumentRepository_Tests.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Shouldly;
using Volo.Abp.Modularity;
using Volo.Docs.Documents;
@ -34,5 +35,13 @@ namespace Volo.Docs
(await DocumentRepository.GetListAsync()).ShouldBeEmpty();
}
[Fact]
public async Task ClearCachesAsync()
{
await DocumentRepository.ClearCachesAsync(DocsTestData.ProjectId);
var documentsAfterClear = await DocumentRepository.GetListByProjectId(DocsTestData.ProjectId);
documentsAfterClear.ForEach(d => d.LastCachedTime.ShouldBe(DateTime.MinValue));
}
}
}

Loading…
Cancel
Save