spec/support/define_factory_models.rb in adminpanel-1.2.5 vs spec/support/define_factory_models.rb in adminpanel-1.2.6
- old
+ new
@@ -10,11 +10,10 @@
Factory.define :gallery, :class => Adminpanel::Gallery do |gallery|
gallery.file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') }
end
Factory.define :image_section, :class => Adminpanel::Image do |image|
- image.model "Section"
image.file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') }
end
Factory.define :product, :class => Adminpanel::Product do |product|
product.price "12392.2"
@@ -24,18 +23,17 @@
Factory.define :category, :class => Adminpanel::Category do |category|
category.name "Test Category"
end
-Factory.define :image_resource, :class => Adminpanel::Image do |image|
- image.model "Product"
- image.file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') }
+Factory.define :photo, :class => Adminpanel::Photo do |photo|
+ photo.file { fixture_file_upload(Rails.root.join('app', 'assets', 'images', 'hipster.jpg'), 'image/jpeg') }
end
Factory.define :section_with_gallery, :class => Adminpanel::Section do |section|
section.key "key"
# section.description "<p>description</p>"
section.has_image true
section.has_description false
section.name "section_name"
section.page "index"
-end
\ No newline at end of file
+end