diff options
author | John Hawthorn <john@hawthorn.email> | 2019-03-18 11:57:05 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-03-18 12:21:28 -0700 |
commit | d0c745b8634be3bd830bc93998f199e18bebef49 (patch) | |
tree | eaf7422b0dd95eb420153bcdee20228558919150 /actionview/test | |
parent | 98d0f93506b0b97804d0d510ffcc435af9b2a2d5 (diff) | |
download | rails-d0c745b8634be3bd830bc93998f199e18bebef49.tar.gz rails-d0c745b8634be3bd830bc93998f199e18bebef49.tar.bz2 rails-d0c745b8634be3bd830bc93998f199e18bebef49.zip |
Remove virtual_path from fallback templates
Diffstat (limited to 'actionview/test')
-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 |