Sha256: 64729f2e2816b866ddda95ae1a9e78f503f9798fe73c513cb2e1d48218ccaadf

Contents?: true

Size: 491 Bytes

Versions: 62

Compression:

Stored size: 491 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class PromoCodeViewModelTest < TestCase
      def test_list_name_returns_the_codes_list_name
        list = create_code_list(name: 'Test List', count: 1)
        promo_code = Pricing::Discount::GeneratedPromoCode.create(
          code: 'test code',
          code_list: list
        )
        view_model = Admin::PromoCodeViewModel.new(promo_code)
        assert_equal('Test List', view_model.list_name)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.26 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.45 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.25 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.23 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.44 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.22 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.43 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.21 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.42 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.20 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.41 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.19 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.40 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.18 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.39 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.17 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.38 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.5.16 test/view_models/workarea/admin/promo_code_view_model_test.rb
workarea-admin-3.4.37 test/view_models/workarea/admin/promo_code_view_model_test.rb