Sha256: 6be668802bd3f73de8c57145b9450c37ddd3f56261e0d1e0eabb2c0caba78b57

Contents?: true

Size: 653 Bytes

Versions: 118

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :modality, class: "Renalware::Modalities::Modality" do
    accountable
    patient
    association :description, factory: :modality_description
    association :reason, factory: :modality_reason
    started_on { Date.parse("2015-04-01") }

    trait :terminated do
      state { "terminated" }
    end

    trait :pd_to_haemo do
      after(:create) do |instance|
        instance.reason = create(:pd_to_haemodialysis)
      end
    end

    trait :haemo_to_pd_modality do
      after(:create) do |instance|
        instance.reason = create(:haemodialysis_to_pd)
      end
    end
  end
end

Version data entries

118 entries across 118 versions & 1 rubygems

Version Path
renalware-core-2.0.147 spec/factories/modalities/modalities.rb
renalware-core-2.0.146 spec/factories/modalities/modalities.rb
renalware-core-2.0.145 spec/factories/modalities/modalities.rb
renalware-core-2.0.144 spec/factories/modalities/modalities.rb
renalware-core-2.0.143 spec/factories/modalities/modalities.rb
renalware-core-2.0.142 spec/factories/modalities/modalities.rb
renalware-core-2.0.141 spec/factories/modalities/modalities.rb
renalware-core-2.0.140 spec/factories/modalities/modalities.rb
renalware-core-2.0.139 spec/factories/modalities/modalities.rb
renalware-core-2.0.138 spec/factories/modalities/modalities.rb
renalware-core-2.0.137 spec/factories/modalities/modalities.rb
renalware-core-2.0.136 spec/factories/modalities/modalities.rb
renalware-core-2.0.135 spec/factories/modalities/modalities.rb
renalware-core-2.0.134 spec/factories/modalities/modalities.rb
renalware-core-2.0.133 spec/factories/modalities/modalities.rb
renalware-core-2.0.132 spec/factories/modalities/modalities.rb
renalware-core-2.0.131 spec/factories/modalities/modalities.rb
renalware-core-2.0.130 spec/factories/modalities/modalities.rb
renalware-core-2.0.129 spec/factories/modalities/modalities.rb
renalware-core-2.0.128 spec/factories/modalities/modalities.rb