diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-03-19 12:18:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-19 12:18:17 -0700 |
commit | 6f03c314de8a24b31536832e9acb6bf8ffda9b82 (patch) | |
tree | a2f466f67878d80f706d6b970a557d39956d4032 /actionview/test/template | |
parent | 7180fa7ba8ee8444de57bfcbc284c17e9bc1330f (diff) | |
parent | d0c745b8634be3bd830bc93998f199e18bebef49 (diff) | |
download | rails-6f03c314de8a24b31536832e9acb6bf8ffda9b82.tar.gz rails-6f03c314de8a24b31536832e9acb6bf8ffda9b82.tar.bz2 rails-6f03c314de8a24b31536832e9acb6bf8ffda9b82.zip |
Merge pull request #35662 from jhawthorn/fallback_resolver_no_virtual_path
Remove virtual_path from fallback templates
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/fallback_file_system_resolver_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionview/test/template/fallback_file_system_resolver_test.rb b/actionview/test/template/fallback_file_system_resolver_test.rb new file mode 100644 index 0000000000..304cdb8a03 --- /dev/null +++ b/actionview/test/template/fallback_file_system_resolver_test.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require "abstract_unit" + +class FallbackFileSystemResolverTest < ActiveSupport::TestCase + def setup + @root_resolver = ActionView::FallbackFileSystemResolver.new("/") + end + + def test_should_have_no_virtual_path + templates = @root_resolver.find_all("hello_world.erb", "#{FIXTURE_LOAD_PATH}/test", false, locale: [], formats: [:html], variants: [], handlers: [:erb]) + assert_equal 1, templates.size + assert_equal "Hello world!", templates[0].source + assert_nil templates[0].virtual_path + end +end |