Add spec tests for video block

This commit is contained in:
Gabriel Arazas 2023-11-24 20:35:36 +08:00
parent 6e2c022c45
commit ac2c00567e
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -219,6 +219,21 @@ describe Asciidoctor::Foodogsquared::Converters::HTML5Modified do
(expect actual).to eq expected.chomp
end
it 'should have a video block with a bunch of attributes' do
input = <<~INPUT
video::hello.mp4[opts="autoplay,loop", preload="metadata"]
INPUT
expected = <<~HTML
<figure>
<video autoplay="autoplay" loop="loop" preload="metadata" src="hello.mp4"><p>Download the video at <a href="hello.mp4">hello.mp4</a>.</p></video>
</figure>
HTML
actual = (Asciidoctor.convert input).chomp
(expect actual).to eq expected.chomp
end
it 'should have a video block with multiple <source> and a caption' do
input = <<~INPUT
.Making up stuff right now