OSDN Git Service

build pictures
[pettanr/pettanr.git] / spec / factories.rb
index 09f4cf2..7617410 100644 (file)
@@ -132,6 +132,11 @@ Factory.define :oplg, :class => OriginalPictureLicenseGroup do |oplg|
   oplg.license_group_id 1
 end
 
+Factory.define :standard_license, :class => StandardLicense do |sl|
+  sl.license_id 1
+  sl.artist_name 'no name'
+end
+
 Factory.define :resource_picture, :class => ResourcePicture do |rp|
   rp.ext 'png'
   rp.width 222
@@ -139,9 +144,25 @@ Factory.define :resource_picture, :class => ResourcePicture do |rp|
   rp.filesize 100000
   rp.artist_id 1
   rp.license_id 1
+  rp.classname 'StandardLicense'
   rp.original_picture_id 1
 end
 
+Factory.define :picture, :class => Picture do |p|
+  p.original_picture_id 1
+  p.revision 1
+  p.ext 'png'
+  p.width 222
+  p.height 111
+  p.filesize 100000
+  p.artist_id 1
+  p.license_id 1
+  p.artist_name 'no name'
+  p.classname 'StandardLicense'
+  p.credit ''
+  p.settings ''
+end
+
 Factory.define :system_picture, :class => SystemPicture do |sp|
   sp.ext 'png'
   sp.width 222