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.0.2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.0.rc1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.0.beta2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.1.0.beta1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.0 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.0.rc2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.0.rc1 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.0.beta2 lib/alchemy/test_support/factories/dummy_user_factory.rb
alchemy_cms-5.0.0.beta1 lib/alchemy/test_support/factories/dummy_user_factory.rb