Sha256: 528b286e6b58635f264f97168b59d14e036a96d9c95d33aa4dc43e7fc1a9fa81
Contents?: true
Size: 582 Bytes
Versions: 5
Compression:
Stored size: 582 Bytes
Contents
# frozen_string_literal: true FactoryBot.define do factory :friendly_shipping_rate_discount, class: "SolidusFriendlyPromotions::ShippingRateDiscount" do amount { BigDecimal("-4.00") } shipping_rate promotion_action do promotion = create(:friendly_promotion, name: "10% off shipping!", customer_label: "10% off") ten_percent = SolidusFriendlyPromotions::Calculators::Percent.new(preferred_percent: 10) SolidusFriendlyPromotions::Actions::AdjustShipment.create!(promotion: promotion, calculator: ten_percent) end label { "10% off" } end end
Version data entries
5 entries across 5 versions & 1 rubygems