2018-02-09 19:07:10 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2021-02-20 09:57:27 -08:00
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: surveys
|
|
|
|
|
#
|
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
|
# description :text
|
|
|
|
|
# end_date :datetime
|
|
|
|
|
# start_date :datetime
|
|
|
|
|
# surveyable_type :string
|
|
|
|
|
# target :integer default("after_conference")
|
|
|
|
|
# title :string
|
|
|
|
|
# created_at :datetime not null
|
|
|
|
|
# updated_at :datetime not null
|
|
|
|
|
# surveyable_id :integer
|
|
|
|
|
#
|
|
|
|
|
# Indexes
|
|
|
|
|
#
|
|
|
|
|
# index_surveys_on_surveyable_type_and_surveyable_id (surveyable_type,surveyable_id)
|
|
|
|
|
#
|
2018-09-03 20:44:39 +02:00
|
|
|
FactoryBot.define do
|
2016-06-28 18:16:06 +03:00
|
|
|
factory :survey do
|
2018-09-08 03:58:50 +02:00
|
|
|
title { 'This is my survey' }
|
|
|
|
|
start_date { Date.current - 1.day }
|
|
|
|
|
end_date { Date.current + 1.day }
|
2018-02-08 21:02:16 +02:00
|
|
|
|
2016-06-28 18:16:06 +03:00
|
|
|
factory :conference_survey do
|
|
|
|
|
association :surveyable, factory: :conference
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
factory :registration_survey do
|
|
|
|
|
association :surveyable, factory: :registration
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|