summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/fixtures/inline-image/subdir/chapter.adoc2
-rw-r--r--spec/image_spec.rb5
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/fixtures/inline-image/subdir/chapter.adoc b/spec/fixtures/inline-image/subdir/chapter.adoc
index fdfd24b..40fab47 100644
--- a/spec/fixtures/inline-image/subdir/chapter.adoc
+++ b/spec/fixtures/inline-image/subdir/chapter.adoc
@@ -4,6 +4,8 @@ A
image:wolpertinger.jpg[] B
+image:wolpertinger.jpg[] B
+
Z
[separator=¦]
diff --git a/spec/image_spec.rb b/spec/image_spec.rb
index 3e8d9a7..78d3d3f 100644
--- a/spec/image_spec.rb
+++ b/spec/image_spec.rb
@@ -30,6 +30,11 @@ describe 'Asciidoctor::Epub3::Converter - Image' do
expect(book).to have_item_with_href('imagez/wolpertinger.jpg')
end
+ it 'does not duplicate images in manifest' do
+ book, = to_epub fixture_file('inline-image/book.adoc')
+ expect(book.items.keys.select {|k| k.include? 'wolpertinger' }.size).to eq(1)
+ end
+
it 'converts font-based icons to CSS' do
book, = to_epub fixture_file('icon/book.adoc')
chapter = book.item_by_href '_chapter.xhtml'