View specs, added factories, fixed bugs

This commit is contained in:
Gopesh Tulsyan 2014-05-19 12:24:48 +05:30
parent 322ddd1501
commit d1e9bd06a6
33 changed files with 319 additions and 12 deletions

View file

@ -3,7 +3,7 @@
FactoryGirl.define do
factory :conference do
title 'The dog and pony show'
short_title 'dps14'
sequence(:short_title) { |n| "dps#{n}14"}
social_tag 'dps14'
timezone 'Amsterdam'
contact_email 'admin@example.com'

View file

@ -0,0 +1,8 @@
FactoryGirl.define do
factory :difficulty_level do
title 'Example Difficulty Level'
description 'Lorem Ipsum dolsum'
color '#ffffff'
conference
end
end

View file

@ -2,9 +2,11 @@
FactoryGirl.define do
factory :email_settings do
send_on_registration false
send_on_registration true
send_on_accepted false
send_on_rejected false
send_on_confirmed_without_registration false
registration_subject 'Lorem Ipsum Dolsum'
registration_email_template 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit'
end
end

View file

@ -6,5 +6,6 @@ FactoryGirl.define do
length 30
minimum_abstract_length 0
maximum_abstract_length 500
conference
end
end

7
spec/factories/rooms.rb Normal file
View file

@ -0,0 +1,7 @@
FactoryGirl.define do
factory :room do
name 'Example Room'
size 4
conference
end
end

View file

@ -0,0 +1,8 @@
FactoryGirl.define do
factory :social_event do
title 'Example Social Event'
description 'Lorem Ipsum Dolsum'
date Date.today
conference
end
end

View file

@ -0,0 +1,7 @@
FactoryGirl.define do
factory :supporter_level do
title 'Example Supporter Level'
url 'www.example.com'
conference
end
end

8
spec/factories/tracks.rb Normal file
View file

@ -0,0 +1,8 @@
FactoryGirl.define do
factory :track do
name 'Example Track'
description 'Lorem Ipsum dolsum'
color '#ffffff'
conference
end
end

7
spec/factories/vdays.rb Normal file
View file

@ -0,0 +1,7 @@
FactoryGirl.define do
factory :vday do
day Date.today
description 'Lorem Ipsum dolsum'
conference
end
end

View file

@ -0,0 +1,11 @@
FactoryGirl.define do
factory :vposition do
title 'Example Volunteer Position'
description 'Lorem Ipsum dolsum'
conference
after(:build) do |vposition|
vposition.vdays << build(:vday, conference: vposition.conference)
end
end
end