Sha256: 8599d3eed708680a8ebd244a1558d7848b1cc81a0c76d6ff97afdc6b284e45e2
Contents?: true
Size: 918 Bytes
Versions: 6
Compression:
Stored size: 918 Bytes
Contents
FactoryGirl.define do factory :authentication_devise_user, :class => Refinery::Authentication::Devise::User do sequence(:username) { |n| "refinery#{n}" } sequence(:email) { |n| "refinery#{n}@example.com" } password "refinerycms" password_confirmation "refinerycms" end factory :authentication_devise_refinery_user, :parent => :authentication_devise_user do roles { [ ::Refinery::Authentication::Devise::Role[:refinery] ] } after(:create) do |user| ::Refinery::Plugins.registered.each_with_index do |plugin, index| user.plugins.create(:name => plugin.name, :position => index) end end end factory :authentication_devise_refinery_superuser, :parent => :authentication_devise_refinery_user do roles { [ ::Refinery::Authentication::Devise::Role[:refinery], ::Refinery::Authentication::Devise::Role[:superuser] ] } end end
Version data entries
6 entries across 6 versions & 1 rubygems