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.104 spec/factories/modalities/modalities.rb
renalware-core-2.0.103 spec/factories/modalities/modalities.rb
renalware-core-2.0.102 spec/factories/modalities/modalities.rb
renalware-core-2.0.101 spec/factories/modalities/modalities.rb
renalware-core-2.0.100 spec/factories/modalities/modalities.rb
renalware-core-2.0.99 spec/factories/modalities/modalities.rb
renalware-core-2.0.98 spec/factories/modalities/modalities.rb
renalware-core-2.0.97 spec/factories/modalities/modalities.rb
renalware-core-2.0.96 spec/factories/modalities/modalities.rb
renalware-core-2.0.95 spec/factories/modalities/modalities.rb
renalware-core-2.0.94 spec/factories/modalities/modalities.rb
renalware-core-2.0.93 spec/factories/modalities/modalities.rb
renalware-core-2.0.92 spec/factories/modalities/modalities.rb
renalware-core-2.0.91 spec/factories/modalities/modalities.rb
renalware-core-2.0.90 spec/factories/modalities/modalities.rb
renalware-core-2.0.89 spec/factories/modalities/modalities.rb
renalware-core-2.0.88 spec/factories/modalities/modalities.rb
renalware-core-2.0.87 spec/factories/modalities/modalities.rb
renalware-core-2.0.86 spec/factories/modalities/modalities.rb
renalware-core-2.0.85 spec/factories/modalities/modalities.rb