Sha256: e5af3e62b8238fe2948e3d6af572d1e101987bb8471f692e55e285041c876832
Contents?: true
Size: 680 Bytes
Versions: 26
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true RSpec.describe Blacklight::IconHelperBehavior do describe '#blacklight_icon' do subject(:icon) { helper.blacklight_icon(:search, classes: 'custom-class') } it 'returns the svg' do expect(icon).to have_css '.blacklight-icons svg' end it 'adds classes to the wrappering element' do expect(icon).to have_css '.custom-class svg' end context 'with backwards compatible arguments' do subject(:icon) { helper.blacklight_icon(:search, aria_hidden: true, label: 'blah') } it 'adds aria attributes' do expect(icon).to have_css '[aria-hidden="true"][aria-label="blah"]' end end end end
Version data entries
26 entries across 26 versions & 2 rubygems