Sha256: e41d1eff4f66aca2790c51926b8e396dfb4744a78154bc554f8434abadc5f4b2

Contents?: true

Size: 649 Bytes

Versions: 62

Compression:

Stored size: 649 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class DiscountSearchViewModelTest < TestCase
      def test_sort_returns_redemptions_when_selected
        view_model = DiscountSearchViewModel.new(mock)
        refute_equal(Sort.redemptions.to_s, view_model.sort)

        view_model = DiscountSearchViewModel.new(
          mock,
          sort: Sort.redemptions.to_s
        )

        assert_equal(Sort.redemptions.to_s, view_model.sort)
      end

      def test_sorts_includes_redemptions
        assert_includes(
          DiscountSearchViewModel.new(mock).sorts,
          Sort.redemptions.to_a
        )
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

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