diff options
Diffstat (limited to 'spec/lib/sidebars/concerns/container_with_html_options_spec.rb')
-rw-r--r-- | spec/lib/sidebars/concerns/container_with_html_options_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/lib/sidebars/concerns/container_with_html_options_spec.rb b/spec/lib/sidebars/concerns/container_with_html_options_spec.rb new file mode 100644 index 00000000000..7f834419866 --- /dev/null +++ b/spec/lib/sidebars/concerns/container_with_html_options_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Sidebars::Concerns::ContainerWithHtmlOptions do + subject do + Class.new do + include Sidebars::Concerns::ContainerWithHtmlOptions + + def title + 'Foo' + end + end.new + end + + describe '#container_html_options' do + it 'includes by default aria-label attribute' do + expect(subject.container_html_options).to eq(aria: { label: 'Foo' }) + end + end + + describe '#collapsed_container_html_options' do + it 'includes by default aria-label attribute' do + expect(subject.collapsed_container_html_options).to eq(aria: { label: 'Foo' }) + end + end +end |