2023-06-14 23:18:51 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
Fabricator(:poll) do
|
|
|
|
post
|
|
|
|
name { sequence(:name) { |i| "Poll #{i}" } }
|
|
|
|
end
|
|
|
|
|
2023-06-27 06:58:16 -04:00
|
|
|
Fabricator(:poll_regular, from: :poll) { type "regular" }
|
|
|
|
|
|
|
|
Fabricator(:poll_multiple, from: :poll) { type "multiple" }
|
|
|
|
|
2023-06-14 23:18:51 -04:00
|
|
|
Fabricator(:poll_option) do
|
|
|
|
poll
|
|
|
|
html { sequence(:html) { |i| "Poll Option #{i}" } }
|
|
|
|
digest { sequence(:digest) { |i| "#{i}" } }
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:poll_vote) do
|
|
|
|
poll
|
|
|
|
poll_option
|
|
|
|
user
|
|
|
|
end
|