Sha256: 9317a72c223a05cf45824941c8f8a34a941de9a45648ebd9bb10f39b3940314c

Contents?: true

Size: 435 Bytes

Versions: 7

Compression:

Stored size: 435 Bytes

Contents

require 'test_helper'

class ForTagUnitTest < Minitest::Test
  def test_for_nodelist
    template = Liquid::Template.parse('{% for item in items %}FOR{% endfor %}')
    assert_equal ['FOR'], template.root.nodelist[0].nodelist
  end

  def test_for_else_nodelist
    template = Liquid::Template.parse('{% for item in items %}FOR{% else %}ELSE{% endfor %}')
    assert_equal ['FOR', 'ELSE'], template.root.nodelist[0].nodelist
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
liquid-3.0.6 test/unit/tags/for_tag_unit_test.rb
liquid-3.0.5 test/unit/tags/for_tag_unit_test.rb
liquid-3.0.4 test/unit/tags/for_tag_unit_test.rb
liquid-3.0.3 test/unit/tags/for_tag_unit_test.rb
liquid-3.0.2 test/unit/tags/for_tag_unit_test.rb
liquid-3.0.1 test/unit/tags/for_tag_unit_test.rb
liquid-3.0.0 test/unit/tags/for_tag_unit_test.rb