Introduce Program to include cfp/rooms/tracks/events/event_types/difficulty_levels
This commit is contained in:
parent
028b82fda8
commit
444356fbc7
117 changed files with 1812 additions and 905 deletions
|
|
@ -1,7 +1,8 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :call_for_paper do
|
||||
factory :cfp do
|
||||
program
|
||||
start_date { 1.day.ago }
|
||||
end_date { 6.days.from_now }
|
||||
end
|
||||
|
|
@ -7,11 +7,12 @@ FactoryGirl.define do
|
|||
timezone 'Amsterdam'
|
||||
start_date { Date.today }
|
||||
end_date { 6.days.from_now }
|
||||
program
|
||||
|
||||
factory :full_conference do
|
||||
venue
|
||||
splashpage
|
||||
registration_period
|
||||
call_for_paper
|
||||
|
||||
after(:build) do |conference|
|
||||
conference.commercials << build(:conference_commercial, commercialable: conference)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ FactoryGirl.define do
|
|||
title 'Example Difficulty Level'
|
||||
description 'Lorem Ipsum dolsum'
|
||||
color '#ffffff'
|
||||
conference
|
||||
program
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ FactoryGirl.define do
|
|||
send_on_confirmed_without_registration false
|
||||
send_on_conference_dates_updated true
|
||||
send_on_conference_registration_dates_updated true
|
||||
send_on_call_for_papers_schedule_public true
|
||||
send_on_call_for_papers_dates_updated true
|
||||
send_on_program_schedule_public true
|
||||
send_on_cfp_dates_updated true
|
||||
conference_dates_updated_body 'Sample Conference\n New Dates: January 17 - 21 2014'
|
||||
conference_dates_updated_subject 'Conference dates have been updated'
|
||||
conference_registration_dates_updated_subject 'Conference registration dates have been updated'
|
||||
|
|
@ -19,9 +19,9 @@ FactoryGirl.define do
|
|||
venue_updated_body 'Venue has been Updated to Sample Location'
|
||||
registration_subject 'Lorem Ipsum Dolsum'
|
||||
registration_body 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit'
|
||||
call_for_papers_dates_updated_subject 'Call for Papers dates have been updated'
|
||||
call_for_papers_dates_updated_body 'Please checkout the new updates to submit your proposal for Sample Conference'
|
||||
call_for_papers_schedule_public_subject 'Sample Conference Cfp schedule is Public'
|
||||
call_for_papers_schedule_public_body 'Call for Papers schedule is Public.Checkout the link'
|
||||
cfp_dates_updated_subject 'Call for Papers dates have been updated'
|
||||
cfp_dates_updated_body 'Please checkout the new updates to submit your proposal for Sample Conference'
|
||||
program_schedule_public_subject 'Sample Conference Cfp schedule is Public'
|
||||
program_schedule_public_body 'Call for Papers schedule is Public.Checkout the link'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ FactoryGirl.define do
|
|||
length 30
|
||||
minimum_abstract_length 0
|
||||
maximum_abstract_length 500
|
||||
conference
|
||||
program
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
FactoryGirl.define do
|
||||
factory :event do
|
||||
sequence(:title) { |n| "The ##{n} talk you'll ever attend." }
|
||||
conference
|
||||
program
|
||||
abstract <<-EOS
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ante
|
||||
lacus, mollis non urna vitae, varius semper leo. Nulla ac nibh dui. Mauris
|
||||
|
|
@ -35,7 +35,7 @@ FactoryGirl.define do
|
|||
# set an event_type if none is passed to the factory.
|
||||
# needs to be created here because otherwise it doesn't belong to the
|
||||
# same conference as the event
|
||||
event.event_type ||= build(:event_type, conference: event.conference)
|
||||
event.event_type ||= build(:event_type, program: event.program)
|
||||
end
|
||||
|
||||
factory :event_full do
|
||||
|
|
@ -44,9 +44,9 @@ FactoryGirl.define do
|
|||
room
|
||||
after(:build) do |event|
|
||||
event.commercials << build(:event_commercial, commercialable: event)
|
||||
event.difficulty_level = build(:difficulty_level, conference: event.conference)
|
||||
event.track = build(:track, conference: event.conference)
|
||||
event.room = build(:room, conference: event.conference)
|
||||
event.difficulty_level = build(:difficulty_level, program: event.program)
|
||||
event.track = build(:track, program: event.program)
|
||||
event.room = build(:room, program: event.program)
|
||||
event.comment_threads << build(:comment, commentable: event)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
9
spec/factories/program.rb
Normal file
9
spec/factories/program.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :program do
|
||||
schedule_public false
|
||||
schedule_fluid false
|
||||
# conference
|
||||
end
|
||||
end
|
||||
|
|
@ -3,7 +3,7 @@ FactoryGirl.define do
|
|||
factory :room do
|
||||
name 'Example Room'
|
||||
size 4
|
||||
conference
|
||||
program
|
||||
|
||||
factory :room_for_100 do
|
||||
name 'Room for 100'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ FactoryGirl.define do
|
|||
name 'Example Track'
|
||||
description 'Lorem Ipsum dolsum'
|
||||
color '#ffffff'
|
||||
conference
|
||||
program
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue