Sha256: 40478c989c4e5acea60b40cee5e72970ade64b91883be63d1ba7dfa6a856c748

Contents?: true

Size: 737 Bytes

Versions: 62

Compression:

Stored size: 737 Bytes

Contents

require 'test_helper'

module Workarea
  class Content
    class AssetTest < TestCase
      def test_image_placeholder
        assert(Asset.image_placeholder.present?)
      end

      def test_open_graph_placeholder
        assert(Asset.open_graph_placeholder.present?)
      end

      def test_favicon_placeholder
        assert(Asset.favicon_placeholder.present?)
      end

      def test_requires_a_file
        new_asset = Asset.new
        refute(new_asset.valid?)
      end

      def test_favicons
        create_asset(tag_list: 'favicon')
        create_asset(tag_list: 'favicon, favicon-32x32')

        assert_equal(2, Asset.favicons.count)
        assert_equal(1, Asset.favicons('32x32').count)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.13 test/models/workarea/content/asset_test.rb
workarea-core-3.4.12 test/models/workarea/content/asset_test.rb