From c32cd7a1fd4ffae8dea28059ad6314eb1d89e13e Mon Sep 17 00:00:00 2001 From: Adam Ploshay Date: Wed, 13 Nov 2024 13:52:44 -0500 Subject: [PATCH] [ESSI-2023] revise failing CollectionBrangingInfo specs --- spec/factories/collection_branding_infos.rb | 4 ++-- spec/models/collection_branding_info_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/factories/collection_branding_infos.rb b/spec/factories/collection_branding_infos.rb index 3aa20ffde..d9340496d 100644 --- a/spec/factories/collection_branding_infos.rb +++ b/spec/factories/collection_branding_infos.rb @@ -9,7 +9,7 @@ target_url { '' } height { 0 } width { 0 } - file_set_id { '1' } + file_set_id { nil } image_path { '/fake/path/to/image' } end initialize_with { CollectionBrandingInfo.new(collection_id: collection_id, filename: filename, role: role, alt_txt: alt_text, target_url: target_url, local_path: local_path, file_set_id: file_set_id, image_path: image_path) } @@ -24,7 +24,7 @@ target_url { 'http://example.com/' } height { 0 } width { 0 } - file_set_id { '1' } + file_set_id { nil } image_path { '/fake/path/to/image' } end initialize_with { CollectionBrandingInfo.new(collection_id: collection_id, filename: filename, role: role, alt_txt: alt_text, target_url: target_url, local_path: local_path, file_set_id: file_set_id, image_path: image_path) } diff --git a/spec/models/collection_branding_info_spec.rb b/spec/models/collection_branding_info_spec.rb index ee2e005a3..8520a6cd2 100644 --- a/spec/models/collection_branding_info_spec.rb +++ b/spec/models/collection_branding_info_spec.rb @@ -2,7 +2,7 @@ RSpec.describe CollectionBrandingInfo, type: :model do let(:banner) { FactoryBot.build(:collection_branding_banner) } - let(:file_set) { double(id: 'file_set_id', uri: 'file_set_uri') } + let(:file_set) { FactoryBot.create(:file_set, id: 'file_set_id', uri: 'file_set_uri') } let(:version) { double(uri: 'version_uri') } let(:versions) { double(any?: true, all: self, last: version) }