Sha256: d188c0df5adfa58bf639b756db235fde4d472fa2017387f198e3087142e7f41f

Contents?: true

Size: 637 Bytes

Versions: 62

Compression:

Stored size: 637 Bytes

Contents

require 'test_helper'

module Workarea
  class SvgAssetFinderTest < TestCase
    setup :setup_path

    def test_find_asset
      assert_kind_of(SvgAssetFinder, SvgAssetFinder.find_asset(@filename))
    end

    def test_pathname
      finder = SvgAssetFinder.new(@filename)
      asset_path = Admin::Engine.root.join("app/assets/images/#{@filename}")
      assert_equal(finder.pathname, asset_path)
    end

    def test_missing_pathname
      finder = SvgAssetFinder.new('bogus.svg')

      assert_nil(finder.pathname)
    end

    private

    def setup_path
      @filename = 'workarea/admin/icons/expand_more.svg'
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.26 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.45 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.25 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.23 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.44 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.22 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.43 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.21 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.42 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.20 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.41 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.19 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.40 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.18 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.39 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.17 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.38 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.5.16 test/lib/workarea/svg_asset_finder_test.rb
workarea-core-3.4.37 test/lib/workarea/svg_asset_finder_test.rb