Sha256: 290f24c9ec7cd2667ab190a81043baf6cfdc6fa6f01c4c53eaafeeaaa30d276f
Contents?: true
Size: 603 Bytes
Versions: 31
Compression:
Stored size: 603 Bytes
Contents
# frozen_string_literal: true FactoryGirl.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
31 entries across 31 versions & 2 rubygems