2017-07-23 11:36:41 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-06 12:50:17 -04:00
|
|
|
require "abstract_unit"
|
2014-02-18 14:12:51 -05:00
|
|
|
|
|
|
|
class TextTest < ActiveSupport::TestCase
|
2019-02-25 22:05:15 -05:00
|
|
|
test "format always return :text" do
|
2019-02-25 16:18:44 -05:00
|
|
|
assert_equal :text, ActionView::Template::Text.new("").format
|
2014-02-18 14:12:51 -05:00
|
|
|
end
|
2017-01-19 17:08:23 -05:00
|
|
|
|
|
|
|
test "identifier should return 'text template'" do
|
|
|
|
assert_equal "text template", ActionView::Template::Text.new("").identifier
|
|
|
|
end
|
|
|
|
|
|
|
|
test "inspect should return 'text template'" do
|
|
|
|
assert_equal "text template", ActionView::Template::Text.new("").inspect
|
|
|
|
end
|
|
|
|
|
|
|
|
test "to_str should return a given string" do
|
|
|
|
assert_equal "a cat", ActionView::Template::Text.new("a cat").to_str
|
|
|
|
end
|
|
|
|
|
|
|
|
test "render should return a given string" do
|
|
|
|
assert_equal "a dog", ActionView::Template::Text.new("a dog").render
|
|
|
|
end
|
2014-02-18 14:12:51 -05:00
|
|
|
end
|