Sha256: 367f50b6fcc44a10d758cbec063801b55d820f45b8a5071889f9ae72f84bd296

Contents?: true

Size: 621 Bytes

Versions: 58

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Spotlight::TranslationsHelper do
  describe '#non_custom_metadata_fields' do
    let(:exhibit) { FactoryBot.create(:exhibit) }
    let!(:custom_field) { FactoryBot.create(:custom_field, exhibit: exhibit) }

    before { allow(helper).to receive(:current_exhibit).and_return(exhibit) }

    it "is an array of the current exhibit's metadata fields with the custom fields removed" do
      expect(exhibit.blacklight_config.show_fields.keys).to include custom_field.field

      expect(helper.non_custom_metadata_fields.keys).not_to include custom_field.field
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.3.0 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.2.0 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.1.0 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.3 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.2 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.1 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/helpers/spotlight/translations_helper_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/helpers/spotlight/translations_helper_spec.rb