1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Basic rendering test

This commit is contained in:
Łukasz Strzałkowski 2013-08-07 00:47:49 +02:00
parent 1e001b1db3
commit 313f1f196a

View file

@ -0,0 +1,19 @@
require 'abstract_unit'
class BasicRenderingController < ActionController::Base
def render_hello_world
render text: "Hello World!"
end
end
class BasicRenderingTest < ActionController::TestCase
tests BasicRenderingController
def test_render_hello_world
get :render_hello_world
assert_equal "Hello World!", @response.body
assert_equal "text/plain", @response.content_type
end
end