Sha256: 484fb22ffea9dfe7febf23d15bee6dd2bfa9e165aa4e4ae3962816470bdffbc3

Contents?: true

Size: 884 Bytes

Versions: 7

Compression:

Stored size: 884 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :bolt_configuration, class: SolidusBolt::BoltConfiguration do
    environment { 'sandbox' }
    api_key { SecureRandom.hex }
    signing_secret { SecureRandom.hex }
    publishable_key { "#{SecureRandom.hex}.#{SecureRandom.hex}.#{SecureRandom.hex}" }
  end

  factory :bolt_payment_method, class: SolidusBolt::PaymentMethod do
    name               { 'Bolt' }
    preference_source  { 'bolt_credentials' }
    available_to_admin { true }
    available_to_users { true }
  end

  factory :bolt_payment_source, class: SolidusBolt::PaymentSource do
    create_bolt_account { false }
    payment_method
  end

  factory :bolt_payment, class: Spree::Payment do
    association(:payment_method, factory: :bolt_payment_method)
    association(:source, factory: :bolt_payment_source)
    order
    state { 'checkout' }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_bolt-0.7.2 lib/solidus_bolt/testing_support/factories.rb
solidus_bolt-0.7.1 lib/solidus_bolt/testing_support/factories.rb
solidus_bolt-0.7.0 lib/solidus_bolt/testing_support/factories.rb
solidus_bolt-0.6.0 lib/solidus_bolt/testing_support/factories.rb
solidus_bolt-0.5.0 lib/solidus_bolt/testing_support/factories.rb
solidus_bolt-0.4.0 lib/solidus_bolt/testing_support/factories.rb
solidus_bolt-0.3.0 lib/solidus_bolt/testing_support/factories.rb