diff --git a/app/views/content_items/detailed_guide.html.erb b/app/views/content_items/detailed_guide.html.erb index bb082ff6f..f609e5fc9 100644 --- a/app/views/content_items/detailed_guide.html.erb +++ b/app/views/content_items/detailed_guide.html.erb @@ -1,6 +1,6 @@ <% content_for :extra_head_content do %> <%= machine_readable_metadata( - schema: :article + schema: :faq ) %> <% end %> diff --git a/test/integration/detailed_guide_test.rb b/test/integration/detailed_guide_test.rb index b4867e15f..f154ce320 100644 --- a/test/integration/detailed_guide_test.rb +++ b/test/integration/detailed_guide_test.rb @@ -85,4 +85,12 @@ class DetailedGuideTest < ActionDispatch::IntegrationTest assert page.has_css?(".metadata-logo[alt='European structural investment funds']") end + + test "renders FAQ structured data" do + setup_and_visit_content_item("detailed_guide") + faq_schema = find_structured_data(page, "FAQPage") + + assert_equal faq_schema["name"], @content_item["title"] + assert_not_equal faq_schema["mainEntity"], [] + end end