Sha256: 499c93d323658d7567f1b535c6c0cafd92b0deed781f9147a27c537b7b55d037
Contents?: true
Size: 1.03 KB
Versions: 18
Compression:
Stored size: 1.03 KB
Contents
FactoryBot.define do factory :organization do contact_email { Faker::Internet.email } description { 'a great org' } locale { 'en' } settings {} name { 'an-organization' } book end factory :private_organization, parent: :organization do name { 'the-private-org' } end factory :public_organization, parent: :organization do public { true } name { 'the-public-org' } login_methods { Mumukit::Login::Settings.login_methods } end factory :base, parent: :public_organization do name { 'base' } end factory :test_organization, parent: :public_organization do name { 'test' } immersible { true } book { create(:book, name: 'test', slug: 'mumuki/mumuki-the-book') } end factory :another_test_organization, parent: :test_organization, traits: [:skip_unique_name_validation] do book { create(:book, name: 'another-test', slug: 'mumuki/mumuki-another-book') } end trait :skip_unique_name_validation do to_create { |instance| instance.save(validate: false) } end end
Version data entries
18 entries across 18 versions & 2 rubygems