aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/lookup_context_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/lookup_context_test.rb')
-rw-r--r--actionpack/test/template/lookup_context_test.rb29
1 files changed, 5 insertions, 24 deletions
diff --git a/actionpack/test/template/lookup_context_test.rb b/actionpack/test/template/lookup_context_test.rb
index 8d063e66b0..5fb1fdc044 100644
--- a/actionpack/test/template/lookup_context_test.rb
+++ b/actionpack/test/template/lookup_context_test.rb
@@ -180,15 +180,11 @@ class LookupContextTest < ActiveSupport::TestCase
assert_not_equal template, old_template
end
-
- test "data can be stored in cached templates" do
- template = @lookup_context.find("hello_world", %w(test))
- template.data["cached"] = "data"
- assert_equal "Hello world!", template.source
-
- template = @lookup_context.find("hello_world", %w(test))
- assert_equal "data", template.data["cached"]
- assert_equal "Hello world!", template.source
+
+ test "responds to #prefixes" do
+ assert_equal [], @lookup_context.prefixes
+ @lookup_context.prefixes = ["foo"]
+ assert_equal ["foo"], @lookup_context.prefixes
end
end
@@ -235,21 +231,6 @@ class LookupContextWithFalseCaching < ActiveSupport::TestCase
template = @lookup_context.find("foo", %w(test), true)
assert_equal "Foo", template.source
end
-
- test "data can be stored as long as template was not updated" do
- template = @lookup_context.find("foo", %w(test), true)
- template.data["cached"] = "data"
- assert_equal "Foo", template.source
-
- template = @lookup_context.find("foo", %w(test), true)
- assert_equal "data", template.data["cached"]
- assert_equal "Foo", template.source
-
- @resolver.hash["test/_foo.erb"][1] = Time.now.utc
- template = @lookup_context.find("foo", %w(test), true)
- assert_nil template.data["cached"]
- assert_equal "Foo", template.source
- end
end
class TestMissingTemplate < ActiveSupport::TestCase