diff --git a/plugin/wasmguest/caps/caps_roundtrip_test.go b/plugin/wasmguest/caps/caps_roundtrip_test.go index f4c6f95..3f291b8 100644 --- a/plugin/wasmguest/caps/caps_roundtrip_test.go +++ b/plugin/wasmguest/caps/caps_roundtrip_test.go @@ -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", resp: &abiv1.ContentGetPageResponse{Page: &abiv1.PageInfo{Id: idAuthor.String(), Slug: "about", Title: "About Us"}}, diff --git a/plugin/wasmguest/caps/testdata/golden/content_published_block_configs_req.pb b/plugin/wasmguest/caps/testdata/golden/content_published_block_configs_req.pb new file mode 100644 index 0000000..917bc0d --- /dev/null +++ b/plugin/wasmguest/caps/testdata/golden/content_published_block_configs_req.pb @@ -0,0 +1,2 @@ + +calcom:booking \ No newline at end of file diff --git a/plugin/wasmguest/caps/testdata/golden/content_published_block_configs_resp.pb b/plugin/wasmguest/caps/testdata/golden/content_published_block_configs_resp.pb new file mode 100644 index 0000000..a75e57b --- /dev/null +++ b/plugin/wasmguest/caps/testdata/golden/content_published_block_configs_resp.pb @@ -0,0 +1,2 @@ + +B{"captchaEnabled":true,"eventTypeSlug":"30min","username":"alice"} \ No newline at end of file