aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | push parameter instantiation to one methodAaron Patterson2012-07-031-1/+1
| |
* | add Mime.fetch so we can have default mime typesAaron Patterson2012-07-031-2/+1
| |
* | make the default environment have actual defaultsAaron Patterson2012-07-031-2/+9
| | | | | | | | | | | | instead of deleting keys on every instantiation, create defaults we actually use. eventually we can pass an environment in to the request, and create a new req / res object on each call.
* | assing the request on the response only onceAaron Patterson2012-07-031-4/+5
| |
* | group things that are alikeAaron Patterson2012-07-031-10/+7
| |
* | push functional test specific methods to it's own moduleAaron Patterson2012-07-031-1/+5
| |
* | test should be testing to_param not to_s, remove Array subclassAaron Patterson2012-07-031-5/+1
| |
* | push the cookie writing stuff out of the controllerAaron Patterson2012-07-031-0/+6
| | | | | | | | merging cookies is responsibility of the test runner
* | extend the controller with special logic on recycleAaron Patterson2012-07-031-6/+3
| | | | | | | | | | | | For some reason, this special logic is only supposed to be executed on the second request. For now, we'll extend on recycle, but we should figure out why this functionality can't be run on every request
* | push req / res setting to the test runnerAaron Patterson2012-07-031-1/+10
|/ | | | | Try to avoid making the controller mutate itself so that we can eventually make the response async
* Merge pull request #6805 from tim-vandecasteele/uploadedfile-paramifyCarlos Antonio da Silva2012-06-231-1/+1
|\ | | | | Don't paramify ActionDispatch::Http::UploadedFile in tests
| * Don't paramify ActionDispatch::Http::UploadedFile in testsTim Vandecasteele2012-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | To test uploading a file without using fixture_file_upload, a posted ActionDispatch::Http::UploadedFile should not be paramified (just like Rack::Test::UploadedFile). (Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't share the same API, tempfile is not accessible on Rack::Test::UploadedFile as discussed in https://github.com/brynary/rack-test/issues/30)
* | add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|/
* Fix incorrect assert_block -> assert conversion. Assumed too much from the ↵Jeremy Kemper2012-05-171-2/+2
| | | | MiniTest deprecation message.
* MiniTest deprecated #assert_block in favor of calling #assert with a blockJeremy Kemper2012-05-171-1/+1
|
* Removing ==Examples and last blank lines of docs from actionpackFrancesco Rodriguez2012-05-151-6/+1
|
* Improve assert_template layout checkingAlexey Vakhov2012-05-041-3/+15
|
* Fix assert_template :layout => nil assertionAlexey Vakhov2012-05-041-2/+5
|
* Fix assert_template assertion with :layout optionAlexey Vakhov2012-05-041-1/+1
|
* Merge pull request #6034 from ↵Piotr Sarnacki2012-04-301-1/+0
|\ | | | | | | | | willbryant/flash_must_not_load_session_on_every_request_master Fix the Flash middleware loading the session on every request
| * fix the Flash middleware loading the session on every request (very ↵Will Bryant2012-04-281-1/+0
| | | | | | | | dangerous especially with Rack::Cache), it should only be loaded when the flash method is called
* | Fix controller_class_name for anonymous controllers.Michael Schuerig2012-04-291-1/+1
| |
* | Don't convert params if the request isn't HTML - fixes #5341Andrew White2012-04-291-6/+18
| |
* | Merge session arg with existing session instead of overwritingAndrew White2012-04-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | This may break existing tests that are asserting the whole session contents but should not break existing tests that are asserting individual keys - e.g: class SomeControllerTest < ActionController::TestCase setup do session['user_id'] = 1 end test "some test" do get :some_action, nil, { 'another_var' => 2 } # This assertion will now fail assert_equal({ 'another_var' => 2 }, session) # This assertion will still pass assert_equal 2, session['another_var] end end Fixes #1529.
* remove unnecessary else statementVasiliy Ermolovich2012-04-261-3/+3
|
* Remove obsolete codeAlexey Vakhov2012-04-121-3/+0
|
* We dont need to merge in the parameters as thats all being reset by the rack ↵David Heinemeier Hansson2012-03-201-1/+0
| | | | headers (and its causing problems for Strong Parameters attempt of wrapping request.parameters because it will change in testing)
* Remove ActionController::TestCase#rescue_action_in_public!Piotr Sarnacki2012-03-151-5/+0
| | | | | | This method has no effect since exception handling was moved to middlewares and ActionController tests do not use any middlewares.
* assert_template matches against RegexpGrant Hutchins2012-03-101-2/+7
| | | | | | | | | | | | | | | This allows for more strict template assertions, while maintaining backward compatibility. For example, if you use assert_template("foo/bar") and "foo/bar/baz" was rendered, the test passes. But if you use assert_template(%r{\Afoo/bar\Z}), you will catch that a different template was rendered. Also, if you passed an unsupported argument to assert_template() in the past, it would silently succeed. Now it raises an ArgumentError.
* force response body to be read in assert_templateSergey Nartimov2012-03-051-0/+4
|
* Add config.default_method_for_update to support PATCHDavid Lee2012-02-221-1/+6
| | | | | | | | | | | | | | | | PATCH is the correct HTML verb to map to the #update action. The semantics for PATCH allows for partial updates, whereas PUT requires a complete replacement. Changes: * adds config.default_method_for_update you can set to :patch * optionally use PATCH instead of PUT in resource routes and forms * adds the #patch verb to routes to detect PATCH requests * adds #patch? to Request * changes documentation and comments to indicate support for PATCH This change maintains complete backwards compatibility by keeping :put as the default for config.default_method_for_update.
* Dont do underscore and camelize, only camelize is fineSemyon Perepelitsa2012-01-311-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-01-111-0/+1
|\
| * Add missing endRafael Mendonça França2012-01-101-0/+1
| |
* | AC:TestCase::Behavior#head only accepts parameters as second argumentRafael Mendonça França2012-01-101-1/+1
| |
* | Fix ActionController::TestCase::Behavior.headRafael Mendonça França2012-01-101-1/+1
| |
* | Merge pull request #4371 from rafaelfranca/test_unit_cleanupAaron Patterson2012-01-091-1/+1
|\ \ | | | | | | Test unit cleanup
| * | Whitespaces :scissors:Rafael Mendonça França2012-01-061-1/+1
| | |
* | | get rid of using instance_variable_names method from ASSergey Nartimov2012-01-071-2/+2
|/ / | | | | | | | | - instance_variables return symbols in 1.9 - there is instance_variable_defined? method
* | register spec subclasses for people who specAaron Patterson2012-01-061-0/+6
| |
* | convert build_message to sprintfAaron Patterson2012-01-061-9/+5
| |
* | test response assertionsAaron Patterson2012-01-061-2/+0
| |
* | use assert_includes rather than calling includes? specificallyAaron Patterson2012-01-061-2/+2
| |
* | Revert "remove deprecated API"Aaron Patterson2012-01-051-0/+12
| | | | | | | | This reverts commit f53c247d10acbaacb0d61824cfce888c4b0520d2.
* | remove deprecated APIAaron Patterson2012-01-051-12/+0
| |
* | fix some whitespace errorsAaron Patterson2012-01-051-5/+5
|/
* allow sending documents in AC::TestCase#post and friends.Nick Sutterer2012-01-031-17/+44
|
* escape assigns[:person], assigns[person] etc in actioncontroller testcaseNick Howard2011-12-141-3/+3
|
* Fix bug in assert_template when using only `:layout` optionPrem Sichanugrist2011-12-061-13/+15
| | | | | | | | | | Currently if you're do this: assert_template :layout => "foo" Regardless of what layout you were using, the test will always pass. This was broken since the introduction of :layout option in [d9375f3f]. We have a lot of test cases in actionpack/test/controller/layout_test.rb that use this feature. This will make sure that those test cases are not true negative.
* Merge pull request #3193 from avakhov/patch-ac-test-case-safe-constantizeJosé Valim2011-10-031-3/+1
|\ | | | | use safe_constantize instead constantize in AC::TestCase