From d44ce1cb73ec9671ee4459ac76171ef32198554e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 27 Oct 2007 20:38:08 +0000 Subject: Integration tests: get_ and post_via_redirect take a headers hash. Closes #9130. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/integration_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index cf40d3462c..00269ca3b8 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -50,27 +50,27 @@ class SessionTest < Test::Unit::TestCase end def test_get_via_redirect - path = "/somepath"; args = {:id => '1'} + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:get).with(path,args) + @session.expects(:get).with(path,args,headers) @session.stubs(:redirect?).returns(true, true, false) @session.expects(:follow_redirect!).times(2) @session.stubs(:status).returns(200) - assert_equal 200, @session.get_via_redirect(path, args) + assert_equal 200, @session.get_via_redirect(path, args, headers) end def test_post_via_redirect - path = "/somepath"; args = {:id => '1'} + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:post).with(path,args) + @session.expects(:post).with(path,args,headers) @session.stubs(:redirect?).returns(true, true, false) @session.expects(:follow_redirect!).times(2) @session.stubs(:status).returns(200) - assert_equal 200, @session.post_via_redirect(path, args) + assert_equal 200, @session.post_via_redirect(path, args, headers) end def test_url_for_with_controller -- cgit v1.2.3