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
Copy file name to clipboardExpand all lines: spec/lib/liquid-rails/tags/content_for_tag_spec.rb
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,23 @@ module Liquid
4
4
moduleRails
5
5
describeContentForTag,type: :tagdo
6
6
it'content_for and yield'do
7
-
Liquid::Template.parse(%|{% content_for not_authorized1 %}alert('You are not authorized to do that!');{% endcontent_for %}|).render(context)
7
+
Liquid::Template.parse(%|{% content_for 'not_authorized1' %}alert('You are not authorized to do that!');{% endcontent_for %}|).render(context)
8
8
9
-
expect_template_result(%|{% yield not_authorized1 %}|,"alert('You are not authorized to do that!');")
9
+
expect_template_result(%|{% yield 'not_authorized1' %}|,"alert('You are not authorized to do that!');")
10
10
end
11
11
12
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)
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
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!');")
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
17
end
18
18
19
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)
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
22
23
-
expect_template_result(%|{% yield not_authorized3 %}|,"alert('You are not authorized to do that 2!');")
23
+
expect_template_result(%|{% yield 'not_authorized3' %}|,"alert('You are not authorized to do that 2!');")
0 commit comments