Sha256: 724ac3f55e4779099c2c9f9c993fe60e11124091bc019bb2cffaab738e7c9493
Contents?: true
Size: 641 Bytes
Versions: 21
Compression:
Stored size: 641 Bytes
Contents
# frozen_string_literal: true require "decidim/core/test/factories" FactoryBot.define do factory :comment, class: "Decidim::Comments::Comment" do author { build(:user, organization: commentable.organization) } commentable { build(:dummy_resource) } root_commentable { commentable } body { Faker::Lorem.paragraph } end factory :comment_vote, class: "Decidim::Comments::CommentVote" do comment { build(:comment) } author { build(:user, organization: comment.organization) } weight { [-1, 1].sample } trait :up_vote do weight 1 end trait :down_vote do weight(-1) end end end
Version data entries
21 entries across 21 versions & 1 rubygems