File: document_test.rb

package info (click to toggle)
ruby-liquid 5.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,176 kB
  • sloc: ruby: 10,561; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'test_helper'

class DocumentTest < Minitest::Test
  include Liquid

  def test_unexpected_outer_tag
    exc = assert_raises(SyntaxError) do
      Template.parse("{% else %}")
    end
    assert_equal(exc.message, "Liquid syntax error: Unexpected outer 'else' tag")
  end

  def test_unknown_tag
    exc = assert_raises(SyntaxError) do
      Template.parse("{% foo %}")
    end
    assert_equal(exc.message, "Liquid syntax error: Unknown tag 'foo'")
  end
end