Sha256: 6e33e9c5e21a7108986cc500090068ae489d42ba116b561bcbd98096fb0e43ef

Contents?: true

Size: 598 Bytes

Versions: 15

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

require "factory_bot"
require "securerandom"

FactoryBot.define do
  factory :meibo_course, class: "Meibo::Course" do
    initialize_with { new(**attributes) }

    transient do
      school_year { nil }
      organization { nil }
    end

    sourced_id { SecureRandom.uuid }
    school_year_sourced_id { school_year&.sourced_id }
    title { "#{school_year&.title}ホームルーム" }
    course_code { "" }
    org_sourced_id { organization&.sourced_id }

    trait :jp do
      initialize_with { Meibo::JapanProfile::Course.new(**attributes) }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/factory_bot/course.rb
meibo-0.27.0 lib/meibo/factory_bot/course.rb
meibo-0.26.0 lib/meibo/factory_bot/course.rb
meibo-0.25.3 lib/meibo/factory_bot/course.rb
meibo-0.25.2 lib/meibo/factory_bot/course.rb
meibo-0.25.1 lib/meibo/factory_bot/course.rb
meibo-0.25.0 lib/meibo/factory_bot/course.rb
meibo-0.24.0 lib/meibo/factory_bot/course.rb
meibo-0.23.0 lib/meibo/factory_bot/course.rb
meibo-0.22.0 lib/meibo/factory_bot/course.rb
meibo-0.21.0 lib/meibo/factory_bot/course.rb
meibo-0.20.0 lib/meibo/factory_bot/course.rb
meibo-0.19.0 lib/meibo/factory_bot/course.rb
meibo-0.18.0 lib/meibo/factory_bot/course.rb
meibo-0.17.0 lib/meibo/factory_bot/course.rb