aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/api
diff options
context:
space:
mode:
authorJorge Bejar <jorge@wyeworks.com>2015-06-02 17:12:50 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2015-06-11 16:54:17 -0300
commit6c165773117dc7e60f5bb4762e58c7c522d69fcc (patch)
treec3c3ed07ec0acf5fb1d420dc7f97a40cf6086bce /actionpack/test/controller/api
parent8d3e6e5f4d97aa8f2b8b8dde949a1b79b50276d1 (diff)
downloadrails-6c165773117dc7e60f5bb4762e58c7c522d69fcc.tar.gz
rails-6c165773117dc7e60f5bb4762e58c7c522d69fcc.tar.bz2
rails-6c165773117dc7e60f5bb4762e58c7c522d69fcc.zip
Return 204 if render is not called in API controllers
Diffstat (limited to 'actionpack/test/controller/api')
-rw-r--r--actionpack/test/controller/api/implicit_render_test.rb15
1 files changed, 15 insertions, 0 deletions
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