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.1.1 spec/factories/modalities/modalities.rb
renalware-core-2.1.0 spec/factories/modalities/modalities.rb
renalware-core-2.0.167 spec/factories/modalities/modalities.rb
renalware-core-2.0.166 spec/factories/modalities/modalities.rb
renalware-core-2.0.165 spec/factories/modalities/modalities.rb
renalware-core-2.0.164 spec/factories/modalities/modalities.rb
renalware-core-2.0.163 spec/factories/modalities/modalities.rb
renalware-core-2.0.162 spec/factories/modalities/modalities.rb
renalware-core-2.0.161 spec/factories/modalities/modalities.rb
renalware-core-2.0.160 spec/factories/modalities/modalities.rb
renalware-core-2.0.159 spec/factories/modalities/modalities.rb
renalware-core-2.0.158 spec/factories/modalities/modalities.rb
renalware-core-2.0.157 spec/factories/modalities/modalities.rb
renalware-core-2.0.156 spec/factories/modalities/modalities.rb
renalware-core-2.0.155 spec/factories/modalities/modalities.rb
renalware-core-2.0.153 spec/factories/modalities/modalities.rb
renalware-core-2.0.152 spec/factories/modalities/modalities.rb
renalware-core-2.0.151 spec/factories/modalities/modalities.rb
renalware-core-2.0.149 spec/factories/modalities/modalities.rb
renalware-core-2.0.148 spec/factories/modalities/modalities.rb