Sha256: 815116c78793b9b61be4e30a1fd7340db541f3bccf295deabc8a28c5f89e1a3b

Contents?: true

Size: 343 Bytes

Versions: 5

Compression:

Stored size: 343 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class CaseTagUnitTest < Minitest::Test
  include Liquid

  def test_case_nodelist
    template = Liquid::Template.parse('{% case var %}{% when true %}WHEN{% else %}ELSE{% endcase %}')
    assert_equal(['WHEN', 'ELSE'], template.root.nodelist[0].nodelist.map(&:nodelist).flatten)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
liquid-5.3.0 test/unit/tags/case_tag_unit_test.rb
liquid-5.2.0 test/unit/tags/case_tag_unit_test.rb
liquid-5.1.0 test/unit/tags/case_tag_unit_test.rb
liquid-5.0.1 test/unit/tags/case_tag_unit_test.rb
liquid-5.0.0 test/unit/tags/case_tag_unit_test.rb