summaryrefslogtreecommitdiff
path: root/spec/sidebar_spec.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-12-31 15:24:46 -0700
committerDan Allen <dan.j.allen@gmail.com>2019-12-31 15:25:25 -0700
commit15539a7dc69b6f65a0775b5a790c6bc1a5605416 (patch)
treeb7193a089f449497552c39c1e1739aca3dc7a948 /spec/sidebar_spec.rb
parent97198468c9af36c4d896ddc82f739367daa81883 (diff)
don't apply border to block if border width is nil
Diffstat (limited to 'spec/sidebar_spec.rb')
-rw-r--r--spec/sidebar_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/sidebar_spec.rb b/spec/sidebar_spec.rb
index cab6ac1b..34f34da5 100644
--- a/spec/sidebar_spec.rb
+++ b/spec/sidebar_spec.rb
@@ -46,4 +46,14 @@ describe 'Asciidoctor::PDF::Converter - Sidebar' do
(expect title_text[:x]).to be > 100
(expect title_text[:y]).to be < sidebar_border_top
end
+
+ it 'should not add border if border width is not set in theme or value is nil' do
+ pdf = to_pdf <<~'EOS', pdf_theme: { sidebar_border_color: 'AA0000', sidebar_border_width: nil }, analyze: :line
+ ****
+ Sidebar
+ ****
+ EOS
+
+ (expect pdf.lines).to have_size 0
+ end
end