discourse/plugins/poll/spec/fabricators/poll_fabricator.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
429 B
Ruby
Raw Normal View History

# frozen_string_literal: true
Fabricator(:poll) do
post
name { sequence(:name) { |i| "Poll #{i}" } }
end
Fabricator(:poll_regular, from: :poll) { type "regular" }
Fabricator(:poll_multiple, from: :poll) { type "multiple" }
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