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

Version Path
mumuki-domain-8.6.1 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.6.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.5.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.4.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.3.1 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.2.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.1.3 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.1.2 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.1.1 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.1.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-8.0.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-7.12.2 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-7.12.1 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-7.12.0 lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-7.11.1 lib/mumuki/domain/factories/organization_factory.rb
mumuki-laboratory-7.11.1 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-c92f2a7212e2/lib/mumuki/domain/factories/organization_factory.rb
mumuki-laboratory-7.11.0 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-2e15c3330133/lib/mumuki/domain/factories/organization_factory.rb
mumuki-domain-7.11.0 lib/mumuki/domain/factories/organization_factory.rb