Sha256: d75ff035ed3acd48defbe435f5641d653c141e3abdeff80a02f7dde0468464e6

Contents?: true

Size: 448 Bytes

Versions: 30

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

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

30 entries across 30 versions & 1 rubygems

Version Path
alchemy_cms-5.1.10 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.10 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.9 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.9 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.8 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.8 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.7 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.7 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.6 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.6 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.5 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.5 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.4 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.4 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.3 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.2.0.b1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.3 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.0 lib/alchemy/test_support/factories/dummy_user_factory.rb