Sha256: 7a25af59edc5243551e9c02292c1724b868ca3fed6abdaad49e8fe6a0af38941

Contents?: true

Size: 379 Bytes

Versions: 91

Compression:

Stored size: 379 Bytes

Contents

FactoryBot.define do
  factory :message, class: 'Inferno::Entities::Message' do
    result

    result_id { result.id }

    sequence(:message) { |n| "MESSAGE #{n}" }

    type { Inferno::Entities::Message::TYPES.sample }

    initialize_with { new(**attributes) }

    to_create do |instance|
      Inferno::Repositories::Messages.new.create(instance.to_hash)
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
inferno_core-0.6.1 spec/factories/message.rb
inferno_core-0.6.0 spec/factories/message.rb
inferno_core-0.5.4 spec/factories/message.rb
inferno_core-0.5.3 spec/factories/message.rb
inferno_core-0.5.2 spec/factories/message.rb
inferno_core-0.5.1 spec/factories/message.rb
inferno_core-0.5.0 spec/factories/message.rb
inferno_core-0.4.44 spec/factories/message.rb
inferno_core-0.4.43 spec/factories/message.rb
inferno_core-0.4.42 spec/factories/message.rb
inferno_core-0.4.41 spec/factories/message.rb
inferno_core-0.4.40 spec/factories/message.rb
inferno_core-0.4.39 spec/factories/message.rb
inferno_core-0.4.38 spec/factories/message.rb
inferno_core-0.4.35 spec/factories/message.rb
inferno_core-0.4.34 spec/factories/message.rb
inferno_core-0.4.33 spec/factories/message.rb
inferno_core-0.4.32 spec/factories/message.rb
inferno_core-0.4.31 spec/factories/message.rb
inferno_core-0.4.30 spec/factories/message.rb