V15: Fix previews (#17181)

* default to preview value from cookie instead of draft.

* Fix tests

---------

Co-authored-by: Zeegaan <skrivdetud@gmail.com>
This commit is contained in:
Bjarke Berg
2024-10-03 15:35:17 +02:00
committed by GitHub
parent 04d71fa354
commit 537a657de3
7 changed files with 43 additions and 19 deletions

View File

@@ -104,7 +104,8 @@ public class DocumentHybridCacheMockTests : UmbracoIntegrationTestWithContent
GetRequiredService<ICacheNodeFactory>(),
GetSeedProviders(),
Options.Create(new CacheSettings()),
GetRequiredService<IPublishedModelFactory>());
GetRequiredService<IPublishedModelFactory>(),
GetRequiredService<IPreviewService>());
_mockedCache = new DocumentCache(_mockDocumentCacheService, GetRequiredService<IPublishedContentTypeCache>());
}