-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathtutorials.rb
More file actions
55 lines (44 loc) · 993 Bytes
/
tutorials.rb
File metadata and controls
55 lines (44 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FactoryBot.define do
factory :video_library do
title { "MyString" }
body { "MyText" }
featured { false }
published { false }
position { 1 }
youtube_url { "MyString" }
type { 'Tutorial' }
trait :featured do
featured { true }
end
trait :published do
published { true }
end
trait :unpublished do
published { false }
end
trait :publicly_visible do
publicly_visible { true }
end
trait :publicly_featured do
publicly_featured { true }
end
trait :tutorial do
type { 'Tutorial' }
end
trait :podcast do
type { 'Podcast' }
end
trait :intro do
type { 'Intro' }
end
end
factory :tutorial, class: 'Tutorial', parent: :video_library do
type { 'Tutorial' }
end
factory :podcast, class: 'Podcast', parent: :video_library do
type { 'Podcast' }
end
factory :intro, class: 'Intro', parent: :video_library do
type { 'Intro' }
end
end