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:
parent
1e001b1db3
commit
313f1f196a
1 changed files with 19 additions and 0 deletions
19
actionpack/test/controller/basic_rendering_test.rb
Normal file
19
actionpack/test/controller/basic_rendering_test.rb
Normal 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
|
||||||
|
|
Loading…
Reference in a new issue