diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/BlockListElementLevelVariationTests.Editing.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/BlockListElementLevelVariationTests.Editing.cs index d7e8ffc5cb..c6f2dff383 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/BlockListElementLevelVariationTests.Editing.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/BlockListElementLevelVariationTests.Editing.cs @@ -555,8 +555,7 @@ internal partial class BlockListElementLevelVariationTests content = ContentService.GetById(content.Key); var savedBlocksValue = content?.Properties["blocks"]?.GetValue()?.ToString(); - Assert.NotNull(savedBlocksValue); - blockListValue = JsonSerializer.Deserialize(savedBlocksValue); + blockListValue = savedBlocksValue is null ? null : JsonSerializer.Deserialize(savedBlocksValue); // limited user access means invariant data is inaccessible since AllowEditInvariantFromNonDefault is disabled if (updateWithLimitedUserAccess) @@ -973,7 +972,7 @@ internal partial class BlockListElementLevelVariationTests } else { - Assert.AreEqual("null", savedBlocksValue); + Assert.IsNull(savedBlocksValue); } }