Sha256: fb3a8a14ea45b0e6a9b7cc52fb90d697b0cc6888aa41c7787fed30a4f2f545f0

Contents?: true

Size: 873 Bytes

Versions: 16

Compression:

Stored size: 873 Bytes

Contents

require 'test_helper'

module Workarea
  module Api
    module Storefront
      class SystemContentIntegrationTest < IntegrationTest
        include Workarea::Storefront::IntegrationTest

        setup :set_content

        def set_content
          @content = Content.for('Layout')
          @content.blocks.create!(
            area: :header_promo,
            type: :text,
            data: { text: 'text' }
          )
          @content.blocks.create!(
            area: :footer_navigation,
            type: :text,
            data: { text: 'text' }
          )
        end

        def test_shows_categories
          get storefront_api.system_content_path('layout')
          result = JSON.parse(response.body)

          assert_equal(@content.id.to_s, result['id'])
          assert_equal(2, result['content_blocks'].count)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
workarea-api-4.5.6 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.5.6 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.5.5 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.5.5 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.5.4 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.5.4 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.5.3 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.5.3 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.5.2 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.5.2 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.5.0 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.5.0 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.4.7 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.4.7 test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-4.4.6 storefront/test/integration/workarea/api/storefront/system_content_integration_test.rb
workarea-api-storefront-4.4.6 test/integration/workarea/api/storefront/system_content_integration_test.rb