Offerings: OfferingBanner (planbare banner, GET /offerings/banner) en layout verwijderd (backend)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,8 +8,8 @@ namespace SlpModularCms.Modules.Offerings.Tests.Services;
|
||||
|
||||
public class OfferingsIndexMarkersTests
|
||||
{
|
||||
private static OfferingDto Dto(string title, string price = "€ 300", string note = "eenmalig", string layout = "card") => new(
|
||||
Guid.NewGuid().ToString(), "slug", title, "Beschrijving", price, note, ["a"], "Start", false, 0, null, null, layout);
|
||||
private static OfferingDto Dto(string title, string price = "€ 300", string note = "eenmalig") => new(
|
||||
Guid.NewGuid().ToString(), "slug", title, "Beschrijving", price, note, ["a"], "Start", false, 0, null, null);
|
||||
|
||||
[Theory]
|
||||
[InlineData("€ 300", "300")]
|
||||
@@ -25,9 +25,9 @@ public class OfferingsIndexMarkersTests
|
||||
=> OfferingsIndexMarkers.ParsePrice(label).Should().Be(expected);
|
||||
|
||||
[Fact]
|
||||
public void JsonLd_IsAnItemListOfOffers_WithPositions_AndTheBannerIncluded()
|
||||
public void JsonLd_IsAnItemListOfOffers_WithPositions()
|
||||
{
|
||||
var json = OfferingsIndexMarkers.JsonLd([Dto("Start"), Dto("Banner", layout: "banner")], "https://slpsoftware.nl");
|
||||
var json = OfferingsIndexMarkers.JsonLd([Dto("Start"), Dto("Pro")], "https://slpsoftware.nl");
|
||||
|
||||
json.Should().StartWith("<script type=\"application/ld+json\">").And.EndWith("</script>");
|
||||
var doc = JsonDocument.Parse(json["<script type=\"application/ld+json\">".Length..^"</script>".Length]).RootElement;
|
||||
|
||||
Reference in New Issue
Block a user