Fix Rails/ContentTag cop (#24691)

This commit is contained in:
Matt Jankowski
2023-04-30 00:47:15 -04:00
committed by GitHub
parent 6e226f5a32
commit bdc74086e6
4 changed files with 10 additions and 16 deletions

View File

@ -29,10 +29,10 @@ describe 'statuses/show.html.haml', without_verify_partial_doubles: true do
header_tags = view.content_for(:header_tags)
expect(header_tags).to match(%r{<meta content=".+" property="og:title" />})
expect(header_tags).to match(%r{<meta content="article" property="og:type" />})
expect(header_tags).to match(%r{<meta content=".+" property="og:image" />})
expect(header_tags).to match(%r{<meta content="http://.+" property="og:url" />})
expect(header_tags).to match(/<meta content=".+" property="og:title">/)
expect(header_tags).to match(/<meta content="article" property="og:type">/)
expect(header_tags).to match(/<meta content=".+" property="og:image">/)
expect(header_tags).to match(%r{<meta content="http://.+" property="og:url">})
end
it 'has twitter player tag' do
@ -48,7 +48,7 @@ describe 'statuses/show.html.haml', without_verify_partial_doubles: true do
header_tags = view.content_for(:header_tags)
expect(header_tags).to match(%r{<meta content="http://.+/media/.+/player" property="twitter:player" />})
expect(header_tags).to match(%r{<meta content="player" property="twitter:card" />})
expect(header_tags).to match(%r{<meta content="http://.+/media/.+/player" property="twitter:player">})
expect(header_tags).to match(/<meta content="player" property="twitter:card">/)
end
end