Sha256: 1e36044af1887c40c9dc6a331f672097aff8c285ad61170f0ab678572f09d3ad

Contents?: true

Size: 665 Bytes

Versions: 34

Compression:

Stored size: 665 Bytes

Contents

require 'test_helper'

module Workarea
  module Search
    class StorefrontTest < TestCase
      def test_active
        model = create_product(active: false)
        refute(Storefront.new(model).active[:now])

        model.update_attributes!(active: true)
        assert(Storefront.new(model).active[:now])

        model.update_attributes!(active: false)
        release = create_release

        Release.with_current(release.id) do
          model.update_attributes!(active: true)
        end

        model.reload
        results = Storefront.new(model).active
        refute(results[:now])
        assert(results[release.id.to_s])
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-core-3.4.45 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.44 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.43 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.42 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.41 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.40 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.39 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.38 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.37 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.36 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.35 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.34 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.33 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.32 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.31 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.30 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.29 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.28 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.27 test/models/workarea/search/storefront_test.rb
workarea-core-3.4.26 test/models/workarea/search/storefront_test.rb