Sha256: d4a4b5faf5b46d79b646823479c09244be0c404f38d074daadd1608281aef3fd
Contents?: true
Size: 1.31 KB
Versions: 2
Compression:
Stored size: 1.31 KB
Contents
include ActionDispatch::TestProcess FactoryGirl.define do factory :user, :class => Adminpanel::User do name 'test user' email 'email@test.com' password '123456' password_confirmation '123456' group_id 1 end factory :group, :class => Adminpanel::Group do name 'Admin' end factory :product, :class => Adminpanel::Product do price "12392.2" name "very little description" description "this is a little longer description, can be very long" end factory :gallery, :class => Adminpanel::Gallery do file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') } end factory :section_with_gallery, :class => Adminpanel::Section do key 'key' # description "<p>description</p>" has_image true has_description false name 'section_name' page 'index' end factory :image_section, :class => Adminpanel::Image do |image| file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') } end factory :category, :class => Adminpanel::Category do name 'Test Category' model 'Product' end factory :photo, :class => Adminpanel::Photo do file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') } end factory :mug, :class => Adminpanel::Mug do name 'super mug' number 2 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adminpanel-2.0.1 | spec/support/factories.rb |
adminpanel-2.0.0 | spec/support/factories.rb |