Sha256: 9b65c0665e26859b7dd0327ebd005722b7022ec894012b88f294fdc96534c56b

Contents?: true

Size: 450 Bytes

Versions: 10

Compression:

Stored size: 450 Bytes

Contents

FactoryGirl.define do
  factory :dorsale_comment, class: ::Dorsale::Comment do
    commentable { create(:customer_vault_corporation) }
    author      { create(:user)                       }
    text        { Faker::Lorem.paragraph              }

    after(:create) do |comment|
      if comment.commentable.is_a?(Dorsale::CustomerVault::Person)
        comment.commentable.receive_comment_notification(comment, :create)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dorsale-3.7.8 spec/factories/dorsale_comments.rb
dorsale-3.7.7 spec/factories/dorsale_comments.rb
dorsale-3.7.6 spec/factories/dorsale_comments.rb
dorsale-3.7.5 spec/factories/dorsale_comments.rb
dorsale-3.7.4 spec/factories/dorsale_comments.rb
dorsale-3.7.2 spec/factories/dorsale_comments.rb
dorsale-3.7.1 spec/factories/dorsale_comments.rb
dorsale-3.7.0 spec/factories/dorsale_comments.rb
dorsale-3.6.1 spec/factories/dorsale_comments.rb
dorsale-3.6.0 spec/factories/dorsale_comments.rb