From 6c165773117dc7e60f5bb4762e58c7c522d69fcc Mon Sep 17 00:00:00 2001 From: Jorge Bejar Date: Tue, 2 Jun 2015 17:12:50 -0300 Subject: Return 204 if render is not called in API controllers --- actionpack/test/controller/api/implicit_render_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 actionpack/test/controller/api/implicit_render_test.rb (limited to 'actionpack/test') diff --git a/actionpack/test/controller/api/implicit_render_test.rb b/actionpack/test/controller/api/implicit_render_test.rb new file mode 100644 index 0000000000..26f9cd8f78 --- /dev/null +++ b/actionpack/test/controller/api/implicit_render_test.rb @@ -0,0 +1,15 @@ +require 'abstract_unit' + +class ImplicitRenderAPITestController < ActionController::API + def empty_action + end +end + +class ImplicitRenderAPITest < ActionController::TestCase + tests ImplicitRenderAPITestController + + def test_implicit_no_content_response + get :empty_action + assert_response :no_content + end +end -- cgit v1.2.3