Sha256: 3a8ab8dfa686bd57d4636002fb2cd54b660624af78459ba15a84b2195247d283

Contents?: true

Size: 397 Bytes

Versions: 12

Compression:

Stored size: 397 Bytes

Contents

require 'factory_bot'

FactoryBot.define do
  factory :alchemy_dummy_user, class: 'DummyUser' do
    sequence(:email) { |n| "john.#{n}@doe.com" }
    password 's3cr3t'
    alchemy_roles ['member']

    trait :as_admin do
      alchemy_roles ['admin']
    end

    trait :as_author do
      alchemy_roles ['author']
    end

    trait :as_editor do
      alchemy_roles ['editor']
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-4.0.6 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.1.2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.1.1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.1.0 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.0.5 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.0.4 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.1.0.rc1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.0.3 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.0.2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.1.0.beta lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.0.1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-4.0.0 lib/alchemy/test_support/factories/dummy_user_factory.rb