Sha256: 671adec1a3b8c9077f3da4d306733056f799d5aced50d305a8301d14203a0878

Contents?: true

Size: 756 Bytes

Versions: 62

Compression:

Stored size: 756 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    module Checkout
      class SummaryViewModelTest < TestCase
        def order
          @order ||= Order.new
        end

        def checkout
          @checkout ||= Workarea::Checkout.new(order)
        end

        def test_show_shipping_options?
          summary = SummaryViewModel.new(checkout)
          refute(summary.show_shipping_options?)

          order.add_item(product_id: 'PROD1', sku: 'SKU', quantity: 1)
          summary.shippings.each { |s| s.stubs(show_options?: false) }
          refute(summary.show_shipping_options?)

          summary.shippings.first.stubs(show_options?: true)
          assert(summary.show_shipping_options?)
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.4.27 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.5.4 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.26 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.5.3 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.25 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.5.2 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.24 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.5.1 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.23 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.22 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.5.0 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.21 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.5.0.beta.1 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.20 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.19 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.18 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.17 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.16 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.15 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb
workarea-storefront-3.4.14 test/view_models/workarea/storefront/checkout/summary_view_model_test.rb