From 9ed61dd290f6db2beacdb41daa27cf36e5545e5f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 20:09:05 +0200 Subject: [PATCH] C2a test: a flattened variant that holds override ids keeps the flush marked Co-Authored-By: Claude Opus 5.5 --- tests/GameCult.Caching.Tests/ElementIdTests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/GameCult.Caching.Tests/ElementIdTests.cs b/tests/GameCult.Caching.Tests/ElementIdTests.cs index 2ed82027..46b0b596 100644 --- a/tests/GameCult.Caching.Tests/ElementIdTests.cs +++ b/tests/GameCult.Caching.Tests/ElementIdTests.cs @@ -758,6 +758,16 @@ namespace GameCult.Caching.Tests } Assert.That(HeaderOf(withIds), Is.EqualTo("cultcache.store.v3")); + + // Flattened, the variant is a plain record holding the ids its override brought; the base holds none. + using (var cache = Open(withIds)) + { + cache.FlattenAsync(new CultRecordKey("v")).GetAwaiter().GetResult(); + cache.Remove(new CultRecordKey("e")); + cache.FlushAllBackingStores(); + } + + Assert.That(HeaderOf(withIds), Is.EqualTo("cultcache.store.v3")); } [Test]