Sha256: 2713fd7e0b4f43515f81d8f3a368d774496feddd3c4e9b529f72609947c6fb9f

Contents?: true

Size: 312 Bytes

Versions: 8

Compression:

Stored size: 312 Bytes

Contents

FactoryGirl.define do
  factory :user, class: "FamilyGallery::User" do
    email { Forgery::Internet.email_address }
    password { Forgery::LoremIpsum.words(2, random: true) }

    factory :admin do
      after :create do |user|
        user.user_roles.create(role: "administrator")
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
family_gallery-0.0.8 spec/factories/family_gallery/user.rb
family_gallery-0.0.7 spec/factories/family_gallery/user.rb
family_gallery-0.0.6 spec/factories/family_gallery/user.rb
family_gallery-0.0.5 spec/factories/family_gallery/user.rb
family_gallery-0.0.4 spec/factories/family_gallery/user.rb
family_gallery-0.0.3 spec/factories/family_gallery/user.rb
family_gallery-0.0.2 spec/factories/family_gallery/user.rb
family_gallery-0.0.1 spec/factories/family_gallery/user.rb