spec/helpers/hierarchy_helper_spec.rb in blacklight-hierarchy-4.2.0 vs spec/helpers/hierarchy_helper_spec.rb in blacklight-hierarchy-4.2.1

- old
+ new

@@ -1,12 +1,20 @@ require 'spec_helper' -describe Blacklight::HierarchyHelper do +RSpec.describe Blacklight::HierarchyHelper do describe '#render_hierarchy' do it 'should remove the _suffix from the field name' do expect(Deprecation).to receive(:warn) field = OpenStruct.new(field: 'the_field_name_facet') expect(helper).to receive(:facet_tree).with('the_field_name').and_return({}) helper.render_hierarchy(field) end + end + + describe '#facet_toggle_button' do + subject { helper.facet_toggle_button(field_name, described_by) } + let(:field_name) { 'exploded_tag_ssim' } + let(:described_by) { 'unique-string' } + + it { is_expected.to be_html_safe } end end