Commit Graph

36 Commits

Author SHA1 Message Date
Joshua Peek
6940c0de12 Unify functional and integration tests cookie helpers 2009-04-26 11:37:11 -05:00
Joshua Peek
dd2ed32418 Start to integrate some of the features in Rack::Test.
Eventually commit ActionDispatch::Test::MockRequest and ActionDispatch::Test:: UploadedFile upstream.
2009-04-24 20:24:54 -05:00
Joshua Peek
4185a4a5f5 update rack fixture to be ruby 1.9 compat 2009-03-15 23:48:07 -05:00
Joshua Peek
d0e5417861 update rack fixture to be ruby 1.9 compat 2009-03-15 23:25:12 -05:00
Joshua Peek
524d8edf68 Update bundled Rack for Ruby 1.9 spec changes 2009-02-07 16:18:09 -06:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Joshua Peek
5b5d0e325d Use Rack::Head middleware to ensure the body is discarded for HEAD requests 2009-02-01 01:01:49 -06:00
Pratik Naik
c99ef814b0 Revert "HTTP Digest authentication [#1230 state:resolved]"
This reverts commit 45dee3842d68359a189fe7c0729359bd5a905ea4.

Reasons :

1. The code is not working in it's current state
2. Should not be using exceptions for flow control
2009-01-13 16:13:42 +00:00
Joshua Peek
b7ea4add86 Bump Rack version to 0.9 2009-01-06 15:20:57 -06:00
Joshua Peek
45dee3842d HTTP Digest authentication [#1230 state:resolved] 2008-12-28 15:13:16 -06:00
Joshua Peek
175cb7a963 Fix metal tests 2008-12-17 10:10:24 -06:00
Jesse Newland
97a178bfa4 Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal:
class Poller < Rails::Rack::Metal
      def call(env)
        if env["PATH_INFO"] =~ /^\/poller/
          [200, {"Content-Type" => "text/plain"}, "Hello World!"]
        else
          super
        end
      end
    end

might be tested like so:

  class PollerTest < ActionController::IntegrationTest
    test "poller returns hello world" do
      get "/poller"
      assert_response 200
      assert_response :success
      assert_response :ok
      assert_equal "Hello World!", response.body
    end
  end

[#1588 state:committed]

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-17 15:59:47 +01:00
Joshua Peek
ed70830713 Switch to Rack based session stores. 2008-12-15 16:33:31 -06:00
Christos Zisopoulos
69387ce016 Fix for Integration::Session follow_redirect! headers['location'] bug with Rack [#1555 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-10 18:38:28 -06:00
Joshua Peek
ebec9d43e2 Make integration test runner more Rack friendly and clean out old CGI cruft 2008-12-08 12:33:16 -06:00
Joshua Peek
31ce92f7b5 Use autoload instead of explicit requires for ActionController 2008-11-23 16:35:47 -06:00
Jeremy Kemper
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Joshua Peek
47cd8b81cc Switched integration test runner to use Rack processor instead of CGI 2008-08-20 13:37:18 -05:00
Joshua Peek
a74dbe6c52 Improve test coverage for integration tests cookie header 2008-08-20 13:22:36 -05:00
Joshua Peek
6f530de944 Test coverage for integration testing with parameters 2008-08-19 20:15:51 -05:00
Joshua Peek
71c4ff07ab Delegate xhr helper method to integration session 2008-08-19 18:53:46 -05:00
Joshua Peek
dbb0abfb7e More integration test coverage 2008-08-17 19:18:18 -05:00
Joshua Peek
40557e17dd Improved test coverage for integration test's api 2008-06-17 21:25:51 -05:00
Michael Koziarski
1537aec184 use stubbing instead of monkeypatching to stop tests from interfering with one another. Closes #11163 [RubyRedRick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 21:43:13 +00:00
Jeremy Kemper
9d755f1983 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
fa906778ff Integration tests use ActionController::Dispatcher rather than the old Dispatcher. Closes #10596.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 19:03:01 +00:00
David Heinemeier Hansson
0f6c86ff40 Added delete_via_redirect and put_via_redirect to integration testing (closes #10497) [philodespotos]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:39:19 +00:00
David Heinemeier Hansson
436da684dc Allow headers[Accept] to be set by hand when calling xml_http_request (closes #10461) [BMorearty]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:10:18 +00:00
Jeremy Kemper
d44ce1cb73 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
2007-10-27 20:38:08 +00:00
Jeremy Kemper
0ee1cb2cd3 Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
46f217b298 Removed deprecated form of calling xml_http_request/xhr without the first argument being the http verb [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 23:00:17 +00:00
Jeremy Kemper
c0c001839c Take advantage of Mocha support for sequenced returns. Closes #8639 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-13 00:55:11 +00:00
Jeremy Kemper
d1c957d067 Integration tests: alias xhr to xml_http_request and add a request_method argument instead of always using POST. Closes #7124.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6796 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-21 09:15:16 +00:00
Jeremy Kemper
236fe10fe9 Integration tests: introduce methods for other HTTP methods. Closes #6353.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 09:28:10 +00:00
Jeremy Kemper
a6e12c0c21 Wrap and skip tests using mocha.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-14 12:49:55 +00:00
Jeremy Kemper
71dbef6d27 Integration tests: thoroughly test ActionController::Integration::Session. Closes #6022.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 23:34:57 +00:00