Sha256: 3f73efff089e1bc70d62970cf4624fe423727a170c058a80d10c837cb319ea3c

Contents?: true

Size: 598 Bytes

Versions: 8

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

8 entries across 8 versions & 1 rubygems

Version Path
meibo-0.16.0 lib/meibo/factory_bot/course.rb
meibo-0.15.0 lib/meibo/factory_bot/course.rb
meibo-0.14.0 lib/meibo/factory_bot/course.rb
meibo-0.13.0 lib/meibo/factory_bot/course.rb
meibo-0.12.0 lib/meibo/factory_bot/course.rb
meibo-0.11.0 lib/meibo/factory_bot/course.rb
meibo-0.10.0 lib/meibo/factory_bot/course.rb
meibo-0.9.0 lib/meibo/factory_bot/course.rb