spec/models/spotlight/resources/upload_spec.rb in blacklight-spotlight-1.0.0 vs spec/models/spotlight/resources/upload_spec.rb in blacklight-spotlight-1.1.0

- old
+ new

@@ -1,9 +1,9 @@ describe Spotlight::Resources::Upload, type: :model do - let!(:exhibit) { FactoryGirl.create :exhibit } - let!(:custom_field) { FactoryGirl.create :custom_field, exhibit: exhibit } + let!(:exhibit) { FactoryBot.create :exhibit } + let!(:custom_field) { FactoryBot.create :custom_field, exhibit: exhibit } let(:resource) { described_class.new(exhibit: exhibit) } let(:doc_builder) { resource.document_builder } let(:configured_fields) { [title_field] + described_class.fields(exhibit) } let(:title_field) { OpenStruct.new(field_name: 'configured_title_field') } @@ -14,10 +14,10 @@ 'spotlight_upload_attribution_tesim' => 'Attribution Data', 'spotlight_upload_date_tesim' => 'Date Data', custom_field.field => 'Custom Field Data' } end - let(:featured_image) { FactoryGirl.create(:featured_image, image: File.open(File.join(FIXTURES_PATH, '800x600.png'))) } + let(:featured_image) { FactoryBot.create(:featured_image, image: File.open(File.join(FIXTURES_PATH, '800x600.png'))) } before do Rails.cache.clear # wipes out any cached image info. allow(resource).to receive(:configured_fields).and_return configured_fields allow(described_class).to receive(:fields).and_return configured_fields