Sha256: 9b4442b00a71c55b8d4534b0c84314e9878915c173ddd39d72ff3a78854f7b53

Contents?: true

Size: 937 Bytes

Versions: 40

Compression:

Stored size: 937 Bytes

Contents

# frozen_string_literal: true

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

40 entries across 40 versions & 1 rubygems

Version Path
renalware-core-2.0.42 spec/factories/hd/sessions.rb
renalware-core-2.0.41 spec/factories/hd/sessions.rb
renalware-core-2.0.40 spec/factories/hd/sessions.rb
renalware-core-2.0.39 spec/factories/hd/sessions.rb
renalware-core-2.0.38 spec/factories/hd/sessions.rb
renalware-core-2.0.37 spec/factories/hd/sessions.rb
renalware-core-2.0.36 spec/factories/hd/sessions.rb
renalware-core-2.0.35 spec/factories/hd/sessions.rb
renalware-core-2.0.34 spec/factories/hd/sessions.rb
renalware-core-2.0.33 spec/factories/hd/sessions.rb
renalware-core-2.0.32 spec/factories/hd/sessions.rb
renalware-core-2.0.31 spec/factories/hd/sessions.rb
renalware-core-2.0.30 spec/factories/hd/sessions.rb
renalware-core-2.0.28 spec/factories/hd/sessions.rb
renalware-core-2.0.27 spec/factories/hd/sessions.rb
renalware-core-2.0.26 spec/factories/hd/sessions.rb
renalware-core-2.0.25 spec/factories/hd/sessions.rb
renalware-core-2.0.24 spec/factories/hd/sessions.rb
renalware-core-2.0.23 spec/factories/hd/sessions.rb
renalware-core-2.0.22 spec/factories/hd/sessions.rb