Sha256: 26239a70fbd209b4781470b6830de46a2c37726b1f0ded2634041dd52894b6ee

Contents?: true

Size: 586 Bytes

Versions: 31

Compression:

Stored size: 586 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class CategoriesIntegrationTest < Workarea::IntegrationTest
      def test_does_not_show_inactive_category
        assert_raise InvalidDisplay do
          get storefront.category_path(create_category(active: false))
          assert(response.not_found?)
        end
      end

      def test_allows_showing_an_inactive_category_when_admin_user
        set_current_user(create_user(admin: true))

        get storefront.category_path(create_category(active: false))
        assert(response.ok?)
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
workarea-storefront-3.5.9 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.31 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.8 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.30 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.7 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.29 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.6 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.28 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.5 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.27 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.4 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.26 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.3 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.25 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.2 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.24 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.1 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.23 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.4.22 test/integration/workarea/storefront/categories_integration_test.rb
workarea-storefront-3.5.0 test/integration/workarea/storefront/categories_integration_test.rb