Sha256: 70f931a2dd9217f883b313e373382a089c844f238b768da679f1e75b484a5898

Contents?: true

Size: 906 Bytes

Versions: 11

Compression:

Stored size: 906 Bytes

Contents

FactoryBot.define do
  factory :hd_session, class: "Renalware::HD::Session::Open" do
    accountable
    association :patient, factory: :hd_patient
    association :hospital_unit, factory: :hospital_unit
    association :dialysate, factory: :hd_dialysate

    signed_on_by { accountable_actor }

    performed_on { 1.week.ago }
    notes "Some notes"

    factory :hd_open_session do
      start_time "11:00"
    end

    factory :hd_dna_session, class: "Renalware::HD::Session::DNA" do
      document {
        {
          patient_on_holiday: "yes"
        }
      }
    end

    factory :hd_closed_session, class: "Renalware::HD::Session::Closed" do
      start_time "11:00"
      end_time "16:00"
      signed_off_at { 1.day.ago }
      signed_off_by { accountable_actor }

      after(:build) do |session|
        session.document = build(:hd_session_document).marshal_dump
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc10 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc9 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc8 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc7 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc6 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc5 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc4 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc3 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.rc1 spec/factories/hd/sessions.rb
renalware-core-2.0.0.pre.beta12 spec/factories/hd/sessions.rb