diff --git a/spec/factories/bulkrax_object_factories.rb b/spec/factories/bulkrax_object_factories.rb index 59e11635..f48b95bc 100644 --- a/spec/factories/bulkrax_object_factories.rb +++ b/spec/factories/bulkrax_object_factories.rb @@ -7,7 +7,8 @@ attributes: {}, source_identifier_value: :source_identifier, work_identifier: :source, - work_identifier_search_field: 'source_sim' + work_identifier_search_field: 'source_sim', + entry: FactoryBot.build(:bulkrax_entry) ) end end diff --git a/spec/models/bulkrax/object_factory_spec.rb b/spec/models/bulkrax/object_factory_spec.rb index 2c888fea..b8ba7a63 100644 --- a/spec/models/bulkrax/object_factory_spec.rb +++ b/spec/models/bulkrax/object_factory_spec.rb @@ -22,7 +22,8 @@ module Bulkrax factory = described_class.new(attributes: attributes, source_identifier_value: 123, work_identifier: "filled_string", - work_identifier_search_field: 'filled_string_sim') + work_identifier_search_field: 'filled_string_sim', + entry: FactoryBot.build(:bulkrax_entry)) factory.base_permitted_attributes = %i[empty_array empty_string filled_array filled_string] expect(factory.send(:transform_attributes)).to eq(attributes.stringify_keys) end @@ -34,7 +35,8 @@ module Bulkrax factory = described_class.new(attributes: attributes, source_identifier_value: 123, work_identifier: "filled_string", - work_identifier_search_field: 'filled_string_sim') + work_identifier_search_field: 'filled_string_sim', + entry: FactoryBot.build(:bulkrax_entry)) factory.base_permitted_attributes = %i[empty_array empty_string filled_array filled_string] factory.transformation_removes_blank_hash_values = true expect(factory.send(:transform_attributes))