From 313f1f196a40c526f88c58b1c5311f7cd8263ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Wed, 7 Aug 2013 00:47:49 +0200 Subject: Basic rendering test --- actionpack/test/controller/basic_rendering_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 actionpack/test/controller/basic_rendering_test.rb (limited to 'actionpack') diff --git a/actionpack/test/controller/basic_rendering_test.rb b/actionpack/test/controller/basic_rendering_test.rb new file mode 100644 index 0000000000..2db3cff395 --- /dev/null +++ b/actionpack/test/controller/basic_rendering_test.rb @@ -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 + \ No newline at end of file -- cgit v1.2.3