You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Liquid::Template.parse(%|{% content_for not_authorized1 %}alert('You are not authorized to do that!');{% endcontent_for %}|).render(context)
8
+
9
+
expect_template_result(%|{% yield not_authorized1 %}|,"alert('You are not authorized to do that!');")
10
+
end
11
+
12
+
it'invokes content_for with the same identifier multiple times'do
13
+
Liquid::Template.parse(%|{% content_for not_authorized2 %}alert('You are not authorized to do that 1!');{% endcontent_for %}|).render(context)
14
+
Liquid::Template.parse(%|{% content_for not_authorized2 %}alert('You are not authorized to do that 2!');{% endcontent_for %}|).render(context)
15
+
16
+
expect_template_result(%|{% yield not_authorized2 %}|,"alert('You are not authorized to do that 1!');alert('You are not authorized to do that 2!');")
17
+
end
18
+
19
+
it'invokes content_for with the same identifier multiple times and flush'do
20
+
Liquid::Template.parse(%|{% content_for not_authorized3 %}alert('You are not authorized to do that 1!');{% endcontent_for %}|).render(context)
21
+
Liquid::Template.parse(%|{% content_for not_authorized3 flush true %}alert('You are not authorized to do that 2!');{% endcontent_for %}|).render(context)
22
+
23
+
expect_template_result(%|{% yield not_authorized3 %}|,"alert('You are not authorized to do that 2!');")
0 commit comments