mastodon/spec/support/html_head_inspection.rb
2026-06-10 13:28:52 +00:00

25 lines
470 B
Ruby

# frozen_string_literal: true
module HtmlHeadInspection
def head_link_icons
response
.parsed_body
.search('html head link[rel=icon]')
end
def head_meta_content(property)
response
.parsed_body
.search("html head meta[property='#{property}']")
.attr('content')
.text
end
def head_meta_exists(property)
!response
.parsed_body
.search("html head meta[property='#{property}']")
.empty?
end
end