OSDN Git Service

t#32046:
[pettanr/pettanr.git] / spec / factories.rb
index 0f29ff8..c35f33c 100644 (file)
@@ -73,6 +73,7 @@ FactoryGirl.define do
     scroll.title "scroll"
     scroll.description 'scroll description'
     scroll.visible 1
+    scroll.author_id 1
   end
 
   factory :scroll_panel, :class => ScrollPanel do |scroll_panel|
@@ -82,6 +83,47 @@ FactoryGirl.define do
     scroll_panel.t 0
   end
 
+  factory :comic, :class => Comic do |comic|
+    comic.title "comic"
+    comic.description 'comic description'
+    comic.visible 1
+    comic.author_id 1
+  end
+
+  factory :story, :class => Story do |story|
+    story.comic_id 1
+    story.title "scroll"
+    story.description 'scroll description'
+    story.visible 1
+    story.t 0
+    story.author_id 1
+  end
+
+  factory :story_sheet, :class => StorySheet do |story_sheet|
+    story_sheet.sheet_id 1
+    story_sheet.story_id 1
+    story_sheet.t 0
+    story_sheet.author_id 1
+  end
+
+  factory :sheet, :class => Sheet do |sheet|
+    sheet.caption "sheet"
+    sheet.width 222
+    sheet.height 111
+    sheet.visible 1
+    sheet.author_id 1
+  end
+
+  factory :sheet_panel, :class => SheetPanel do |sheet_panel|
+    sheet_panel.sheet_id 1
+    sheet_panel.panel_id 1
+    sheet_panel.x 111
+    sheet_panel.y 200
+    sheet_panel.z 1
+    sheet_panel.t 0
+    sheet_panel.author_id 1
+  end
+
   factory :original_picture, :class => OriginalPicture do |op|
     op.ext 'png'
     op.width 222