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
|
2016-12-02 16:42:37 -05:00
|
|
|
test "formats always return :text" do
|
|
|
|
assert_equal [:text], ActionView::Template::Text.new("").formats
|
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
|