Sha256: 0b1a06ba9cab362d78f8e74ec7adeb70d9a8127c5898730ce50ebb239961465a

Contents?: true

Size: 500 Bytes

Versions: 22

Compression:

Stored size: 500 Bytes

Contents

require 'factory_girl'

Factory.define :user do |u|
  u.sequence(:username) { |n| "person#{n}" }
  u.sequence(:email) { |n| "person#{n}@cucumber.com" }
  u.password  "greenandjuicy"
  u.password_confirmation "greenandjuicy"
end

Factory.define :refinery_user, :parent => :user do |u|
  u.roles { [ Role[:refinery] ] }

  u.after_create do |user|
    Refinery::Plugins.registered.each_with_index do |plugin, index|
      user.plugins.create(:name => plugin.name, :position => index)
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
refinerycms-authentication-0.9.9.21 features/support/factories.rb
refinerycms-authentication-0.9.9.20 features/support/factories.rb
refinerycms-vimeo-videos-0.1.7 features/support/factories.rb
refinerycms-authentication-0.9.9.19 features/support/factories.rb
refinerycms-authentication-0.9.9.18 features/support/factories.rb
refinerycms-authentication-0.9.9.17 features/support/factories.rb
refinerycms-authentication-0.9.9.16 features/support/factories.rb
refinerycms-authentication-0.9.9.15 features/support/factories.rb
refinerycms-authentication-0.9.9.14 features/support/factories.rb
refinerycms-authentication-0.9.9.13 features/support/factories.rb
refinerycms-authentication-0.9.9.12 features/support/factories.rb
refinerycms-authentication-0.9.9.11 features/support/factories.rb
refinerycms-authentication-0.9.9.10 features/support/factories.rb
refinerycms-authentication-0.9.9.9 features/support/factories.rb
refinerycms-authentication-0.9.9.8 features/support/factories.rb
refinerycms-authentication-0.9.9.7 features/support/factories.rb
refinerycms-authentication-0.9.9.5 features/support/factories.rb
refinerycms-authentication-0.9.9.4 features/support/factories.rb
refinerycms-authentication-0.9.9.3 features/support/factories.rb
refinerycms-authentication-0.9.9.2 features/support/factories.rb