Skip to content

Commit

Permalink
Don't expect dynamic_image to generate alt description from filename
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Aug 6, 2024
1 parent e3e622e commit 57a82cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/formatters/pages_core/html_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def attachment_path(attachment)
context "with image without attributes" do
let(:string) { "[image:#{image.id}]" }
let(:pattern) do
%r{<figure.class="image.landscape"><img.alt="Image".
%r{<figure.class="image.landscape"><img.
src="/dynamic_images/([\w\d]+)/320x200/#{image.id}-([\w\d]+)\.png"
.width="320".height="200"></figure>}x
end
Expand All @@ -129,7 +129,7 @@ def attachment_path(attachment)
context "with image with size" do
let(:string) { "[image:#{image.id} size=\"100x100\"]" }
let(:pattern) do
%r{<figure.class="image.landscape"><img.alt="Image".
%r{<figure.class="image.landscape"><img.
src="/dynamic_images/([\w\d]+)/100x62/#{image.id}-([\w\d]+)\.png"
.width="100".height="62"></figure>}x
end
Expand All @@ -140,7 +140,7 @@ def attachment_path(attachment)
context "with image with class name" do
let(:string) { "[image:#{image.id} class=\"float-left\"]" }
let(:pattern) do
%r{<figure.class="image.landscape.float-left"><img.alt="Image".
%r{<figure.class="image.landscape.float-left"><img.
src="/dynamic_images/([\w\d]+)/320x200/#{image.id}-([\w\d]+)\.png"
.width="320".height="200"></figure>}x
end
Expand All @@ -152,7 +152,7 @@ def attachment_path(attachment)
let(:string) { "[image:#{image.id} link=\"http://example.com\"]" }
let(:pattern) do
%r{<figure.class="image.landscape"><a.href="http://example.com">
<img.alt="Image".src="/dynamic_images/([\w\d]+)/320x200/#{image.id}
<img.src="/dynamic_images/([\w\d]+)/320x200/#{image.id}
-([\w\d]+)\.png".width="320".height="200"></a></figure>}x
end

Expand All @@ -175,7 +175,7 @@ def attachment_path(attachment)
end
let(:string) { "[image:#{image.id}]" }
let(:pattern) do
%r{<figure.class="image.landscape"><img.alt="Image".
%r{<figure.class="image.landscape"><img.
src="/dynamic_images/([\w\d]+)/320x200/#{image.id}-([\w\d]+)\.png"
.width="320".height="200">
<figcaption>This.is.a.caption</figcaption></figure>}x
Expand Down

0 comments on commit 57a82cc

Please sign in to comment.