OSDN Git Service

fix js manifest
[pettanr/pettanr.git] / spec / factories / scroll.rb
1 # -*- encoding: utf-8 -*-\r
2 FactoryGirl.define do\r
3   factory :scroll_hello, :class => Scroll do |i|\r
4     i.title 'おめざめ2'\r
5     i.description ''\r
6     i.visible 1\r
7     #association :author, factory: :author_yas\r
8     trait :with_scroll_panels do\r
9       after(:create) do |scroll, evaluator|\r
10         #panel_hello = create(:panel_hello, author: scroll.author)\r
11         create(:scroll_panel_plain, t: 0, scroll: scroll, panel: create(:panel_hello, author: scroll.author))\r
12         panel_my_name = create(:panel_hello, author: scroll.author)\r
13         create(:scroll_panel_plain, t: 1, scroll: scroll, panel: panel_my_name)\r
14         panel_penjiro = create(:panel_hello, author: scroll.author)\r
15         create(:scroll_panel_plain, t: 2, scroll: scroll, panel: panel_penjiro)\r
16         panel_enjoy = create(:panel_hello, author: scroll.author)\r
17         create(:scroll_panel_plain, t: 3, scroll: scroll, panel: panel_enjoy)\r
18       end\r
19     end\r
20     factory :scroll_hello_with_scroll_panels, traits: [:with_scroll_panels]\r
21   end\r
22   factory :scroll_hidden, :class => Scroll do |i|\r
23     i.title '非公開のスクロール'\r
24     i.description '非公開の状態で作成したり、公開スクロールを非公開に変えるときに使う。'\r
25     i.visible 0\r
26   end\r
27   factory :scroll003, :class => Scroll do |i|\r
28     i.title 'aaaaaaaa'\r
29     i.description ''\r
30     i.visible 1\r
31     i.author_id 1\r
32   end\r
33   factory :scroll004, :class => Scroll do |i|\r
34     i.title 'aaaaaaaa'\r
35     i.description ''\r
36     i.visible 1\r
37     i.author_id 1\r
38   end\r
39   factory :scroll005, :class => Scroll do |i|\r
40     i.title '投稿した直後'\r
41     i.description ''\r
42     i.visible 1\r
43     i.author_id 4\r
44   end\r
45   factory :scroll006, :class => Scroll do |i|\r
46     i.title '投稿した直後'\r
47     i.description ''\r
48     i.visible 1\r
49     i.author_id 1\r
50   end\r
51   factory :scroll007, :class => Scroll do |i|\r
52     i.title '「はてなブックマーク」が、重すぎる'\r
53     i.description 'zzzz'\r
54     i.visible 1\r
55     i.author_id 1\r
56   end\r
57   factory :scroll008, :class => Scroll do |i|\r
58     i.title '投稿した直後2'\r
59     i.description 'qwe'\r
60     i.visible 1\r
61     i.author_id 1\r
62   end\r
63 end\r