lib/meibo/factory_bot/organization.rb in meibo-0.9.0 vs lib/meibo/factory_bot/organization.rb in meibo-0.10.0

- old
+ new

@@ -28,15 +28,31 @@ check_digit = (10 - (numerized_school_code.chars.map(&:to_i).zip([1, 2].cycle).map { (_1 * _2).digits.sum }.sum % 10)) % 10 "#{school_type}#{prefecture_no}#{kubun}#{school_no}#{check_digit}" end - trait :district do - type { Meibo::Organization::TYPES[:district] } + trait :department do + type { Meibo::Organization::TYPES[:department] } end trait :school do type { Meibo::Organization::TYPES[:school] } + end + + trait :district do + type { Meibo::Organization::TYPES[:district] } + end + + trait :local do + type { Meibo::Organization::TYPES[:local] } + end + + trait :state do + type { Meibo::Organization::TYPES[:state] } + end + + trait :national do + type { Meibo::Organization::TYPES[:national] } end trait :elementary_school do |factory| type { Meibo::Organization::TYPES[:school] } sequence(:name) {|n| "第#{n}小学校" }