This commit is contained in:
Henne Vogelsang 2017-04-18 17:37:56 +00:00 committed by GitHub
commit 9b10a68ea7
6 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@
FactoryGirl.define do FactoryGirl.define do
factory :conference do factory :conference do
title { Faker::Book.title } title { CGI.escapeHTML(Faker::Book.title) }
short_title { SecureRandom.urlsafe_base64(4) } short_title { SecureRandom.urlsafe_base64(4) }
timezone { Faker::Address.time_zone } timezone { Faker::Address.time_zone }
start_date { Date.today } start_date { Date.today }

View file

@ -2,8 +2,8 @@
FactoryGirl.define do FactoryGirl.define do
factory :event do factory :event do
title { Faker::Hipster.sentence } title { CGI.escapeHTML(Faker::Hipster.sentence) }
abstract { Faker::Hipster.paragraph(2) } abstract { CGI.escapeHTML(Faker::Hipster.paragraph(2)) }
program program

View file

@ -2,7 +2,7 @@
FactoryGirl.define do FactoryGirl.define do
factory :sponsor do factory :sponsor do
name { Faker::Company.name } name { CGI.escapeHTML(Faker::Company.name) }
website_url { Faker::Internet.url } website_url { Faker::Internet.url }
description { Faker::Lorem.paragraph } description { Faker::Lorem.paragraph }

View file

@ -1,6 +1,6 @@
FactoryGirl.define do FactoryGirl.define do
factory :ticket do factory :ticket do
title { "#{Faker::Hipster.word} Ticket" } title { CGI.escapeHTML("#{Faker::Hipster.word} Ticket") }
price_cents 1000 price_cents 1000
price_currency 'USD' price_currency 'USD'
end end

View file

@ -1,6 +1,6 @@
FactoryGirl.define do FactoryGirl.define do
factory :track do factory :track do
name { Faker::Commerce.department(2, true) } name { CGI.escapeHTML(Faker::Commerce.department(2, true)) }
description { Faker::Lorem.sentence } description { Faker::Lorem.sentence }
color { Faker::Color.hex_color } color { Faker::Color.hex_color }
program program

View file

@ -1,7 +1,7 @@
# Read about factories at https://github.com/thoughtbot/factory_girl # Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do FactoryGirl.define do
factory :venue do factory :venue do
name { "#{Faker::Company.name} Office" } name { CGI.escapeHTML("#{Faker::Company.name} Office") }
street { Faker::Address.street_address } street { Faker::Address.street_address }
city { Faker::Address.city } city { Faker::Address.city }
postalcode { Faker::Address.postcode } postalcode { Faker::Address.postcode }