aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/template_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb
index 63f792d328..f2156c31de 100644
--- a/actionpack/test/template/template_test.rb
+++ b/actionpack/test/template/template_test.rb
@@ -151,6 +151,14 @@ class TestERBTemplate < ActiveSupport::TestCase
end
end
+ def test_inline_template_is_only_equal_if_source_match
+ inline1 = ActionView::Template::Inline.new("sample", ERBHandler)
+ inline2 = ActionView::Template::Inline.new("sample", ERBHandler)
+ inline3 = ActionView::Template::Inline.new("other", ERBHandler)
+ assert inline1.eql?(inline2)
+ assert !inline1.eql?(inline3)
+ end
+
if "ruby".encoding_aware?
def test_resulting_string_is_utf8
@template = new_template