Sha256: f2d48f665a509513783474b4095afddef1a4ae3079d502f5324dd90dc6288281

Contents?: true

Size: 547 Bytes

Versions: 16

Compression:

Stored size: 547 Bytes

Contents

require 'test_helper'

module Workarea
  module Api
    module Storefront
      class AssetsIntegrationTest < IntegrationTest
        setup :set_asset

        def set_asset
          @asset = create_asset
        end

        def test_shows_assets
          get storefront_api.asset_path(@asset)
          result = JSON.parse(response.body)

          assert_equal(@asset.id.to_s, result['id'])
          assert_equal(@asset.name, result['name'])
          assert_includes(result['url'], @asset.optim.url)
        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/assets_integration_test.rb
workarea-api-storefront-4.5.6 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.5.5 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.5.5 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.5.4 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.5.4 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.5.3 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.5.3 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.5.2 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.5.2 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.5.0 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.5.0 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.4.7 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.4.7 test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-4.4.6 storefront/test/integration/workarea/api/storefront/assets_integration_test.rb
workarea-api-storefront-4.4.6 test/integration/workarea/api/storefront/assets_integration_test.rb