diff options
author | wycats <wycats@gmail.com> | 2010-10-10 00:51:52 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-10-10 00:54:11 -0700 |
commit | 8cb2cfbf71092f95090335cbdde0340cc74db748 (patch) | |
tree | 768eaff354b8644bdaf0906b4c3933b7a00a20bc /actionpack/test | |
parent | 38d78f99d52801d8392a7229b40edae74cc3d142 (diff) | |
download | rails-8cb2cfbf71092f95090335cbdde0340cc74db748.tar.gz rails-8cb2cfbf71092f95090335cbdde0340cc74db748.tar.bz2 rails-8cb2cfbf71092f95090335cbdde0340cc74db748.zip |
Fix a few bugs when trying to use Head standalone
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/new_base/bare_metal_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_base/bare_metal_test.rb b/actionpack/test/controller/new_base/bare_metal_test.rb index 8a06e8d2a0..44922cecff 100644 --- a/actionpack/test/controller/new_base/bare_metal_test.rb +++ b/actionpack/test/controller/new_base/bare_metal_test.rb @@ -24,4 +24,19 @@ module BareMetalTest assert_equal "Hello world", string end end + + class HeadController < ActionController::Metal + include ActionController::Head + + def index + head :not_found + end + end + + class HeadTest < ActiveSupport::TestCase + test "head works on its own" do + status, headers, body = HeadController.action(:index).call(Rack::MockRequest.env_for("/")) + assert_equal 404, status + end + end end |