Sha256: 76bbca7a0da5347b41868e8191c1932261a9b24f7b10cd00666badd555db5d43

Contents?: true

Size: 1.21 KB

Versions: 70

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :modality_description, class: "Renalware::Modalities::Description" do
    name { "unspecific modality description not set in factory" }

    initialize_with { Renalware::Modalities::Description.find_or_create_by(name: name) }

    trait :transfer_out do
      name { "Transfer Out" }
      code { "transfer_out" }
    end

    trait :pd do
      name { "PD" }
      type { "Renalware::PD::ModalityDescription" }
      code { "pd" }
    end

    trait :hd do
      name { "HD" }
      type { "Renalware::HD::ModalityDescription" }
      code { "hd" }
    end

    trait :transplant do
      name { "Transplant" }
      type { "Renalware::Transplants::RecipientModalityDescription" }
      code { "transplant" }
    end

    trait :low_clearance do
      name { "Low Clearance" }
      type { "Renalware::LowClearance::ModalityDescription" }
      code { "low_clearance" }
    end

    trait :death do
      name { "Death" }
      type { "Renalware::Deaths::ModalityDescription" }
      code { "death" }
    end

    trait :live_donor do
      name { "Live Donor" }
      type { "Renalware::Transplants::DonorModalityDescription" }
      code { "live_donor" }
    end
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
renalware-core-2.0.167 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.166 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.165 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.164 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.163 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.162 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.161 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.160 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.159 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.158 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.157 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.156 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.155 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.153 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.152 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.151 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.149 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.148 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.147 spec/factories/modalities/modality_descriptions.rb
renalware-core-2.0.146 spec/factories/modalities/modality_descriptions.rb