Skip to content

Commit

Permalink
Fix ActionController::TestCase::Behavior.head
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jan 10, 2012
1 parent 2babe0a commit 30f9af9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/test_case.rb
Expand Up @@ -403,7 +403,7 @@ def delete(action, *args)

# Executes a request simulating HEAD HTTP method and set/volley the response
def head(action, parameters = nil, session = nil, flash = nil)
process(action, parameters, session, flash, "HEAD")
process(action, "HEAD", parameters, session, flash)
end

def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
Expand Down
5 changes: 5 additions & 0 deletions actionpack/test/controller/test_case_test.rb
Expand Up @@ -187,6 +187,11 @@ def test_document_body_with_put
assert_equal "document body", @response.body
end

def test_head
head :test_params
assert_equal 200, @response.status
end

def test_process_without_flash
process :set_flash
assert_equal '><', flash['test']
Expand Down

0 comments on commit 30f9af9

Please sign in to comment.