test(caps): golden roundtrip case for content.published_block_configs

The cms host parity gate replays these goldens; the capability landed
in v0.2.3 without them, so hosts on v0.2.3 fail TestGoldenParity —
pin v0.2.4 instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-07-07 23:40:29 +08:00
parent b5a288c3de
commit 99e791b6e9
3 changed files with 17 additions and 0 deletions

View File

@ -160,6 +160,19 @@ func TestCapabilityRoundTrip(t *testing.T) {
} }
}, },
}, },
{
name: "content_published_block_configs", wantMethod: "content.published_block_configs",
resp: &abiv1.ContentPublishedBlockConfigsResponse{Configs: [][]byte{[]byte(`{"captchaEnabled":true,"eventTypeSlug":"30min","username":"alice"}`)}},
run: func(t *testing.T, cs plugin.CoreServices) {
got, err := cs.Content.PublishedBlockConfigs(ctx, "calcom:booking")
if err != nil {
t.Fatal(err)
}
if len(got) != 1 || got[0]["username"] != "alice" || got[0]["captchaEnabled"] != true {
t.Errorf("configs = %+v", got)
}
},
},
{ {
name: "content_get_page", wantMethod: "content.get_page", name: "content_get_page", wantMethod: "content.get_page",
resp: &abiv1.ContentGetPageResponse{Page: &abiv1.PageInfo{Id: idAuthor.String(), Slug: "about", Title: "About Us"}}, resp: &abiv1.ContentGetPageResponse{Page: &abiv1.PageInfo{Id: idAuthor.String(), Slug: "about", Title: "About Us"}},

View File

@ -0,0 +1,2 @@
calcom:booking

View File

@ -0,0 +1,2 @@
B{"captchaEnabled":true,"eventTypeSlug":"30min","username":"alice"}