lib/cocina/rspec/factories.rb in cocina-models-0.90.0 vs lib/cocina/rspec/factories.rb in cocina-models-0.91.0

- old
+ new

@@ -13,14 +13,17 @@ end SUPPORTED_TYPES = %i[ admin_policy admin_policy_with_metadata + admin_policy_lite collection collection_with_metadata + collection_lite dro dro_with_metadata + dro_lite request_admin_policy request_collection request_dro ].freeze @@ -86,10 +89,14 @@ def self.build_dro(attributes) Cocina::Models.build(build_dro_properties(**DRO_DEFAULTS.merge(attributes))) end + def self.build_dro_lite(attributes) + Cocina::Models.build_lite(build_dro_properties(**DRO_DEFAULTS.merge(attributes))) + end + # rubocop:disable Metrics/ParameterLists def self.build_request_dro_properties(type:, version:, label:, title:, source_id:, admin_policy_id:, barcode: nil, catkeys: [], folio_instance_hrids: [], collection_ids: []) { type: type, @@ -164,15 +171,23 @@ def self.build_collection(attributes) Cocina::Models.build(build_collection_properties(**COLLECTION_DEFAULTS.merge(attributes))) end + def self.build_collection_lite(attributes) + Cocina::Models.build_lite(build_collection_properties(**COLLECTION_DEFAULTS.merge(attributes))) + end + def self.build_request_collection(attributes) Cocina::Models.build_request(build_request_collection_properties(**REQUEST_COLLECTION_DEFAULTS.merge(attributes))) end def self.build_admin_policy(attributes) Cocina::Models.build(build_admin_policy_properties(**ADMIN_POLICY_DEFAULTS.merge(attributes))) + end + + def self.build_admin_policy_lite(attributes) + Cocina::Models.build_lite(build_admin_policy_properties(**ADMIN_POLICY_DEFAULTS.merge(attributes))) end def self.build_request_admin_policy(attributes) Cocina::Models.build_request(build_request_admin_policy_properties(**REQUEST_ADMIN_POLICY_DEFAULTS.merge(attributes))) end