aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2549 from trek/RoutingErrorForMissingControllersAaron Patterson2012-05-211-0/+10
|\ | | | | When a route references a missing controller, raise ActionController::RoutingError with clearer message
| * When a route references a missing controller, raise ↵Trek Glowacki2011-08-161-0/+10
| | | | | | | | ActionController::RoutingError with a clearer message
* | Escape the extension when normalizing the action cache path.Andrew White2012-05-201-1/+30
| | | | | | | | | | | | | | | | | | Although no recognized formats use non-ASCII characters, sometimes they can be included in the :format parameter because of invalid URLS. To prevent encoding incompatibility errors we need to escape them before passing the path to URI.unescape. Closes #4379
* | Raise Assertion instead of RoutingError for routing assertion failures.David Chelimsky2012-05-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, assert_recognizes, assert_generates, and assert_routing raised ActionController::RoutingError when they failed to recognize the route. This commit changes them to raise Assertion instead. This aligns with convention for logical failures, and supports reporting tools that care about the difference between logical failures and errors e.g. the summary at the end of a test run. - Fixes #5899
* | Show in log correct wrapped keysDmitry Vorotilin2012-05-201-0/+8
| |
* | mispelling errors in render_text_test.rb and sqlite_specific_schemaangelo giovanni capilleri2012-05-121-2/+2
| |
* | Refactor the handling of default_url_options in integration testsAndrew White2012-05-101-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | This commit improves the handling of default_url_options in integration tests by making behave closer to how a real application operates. Specifically the following issues have been addressed: * Options specified in routes.rb are used (fixes #546) * Options specified in controllers are used * Request parameters are recalled correctly * Tests can override default_url_options directly
* | Add failing test re #3436 which demonstrates content_type is not respected ↵Kunal Shah2012-05-081-0/+21
| | | | | | | | when using the :head method/shortcut
* | Merge pull request #5368 from andhapp/remove-max-staleJosé Valim2012-05-071-4/+4
|\ \ | | | | | | Minor test improvement
| * | Removed max-stale from the tests since it's a request cache-control ↵Anuj Dutta2012-03-101-4/+4
| | | | | | | | | | | | directive, just for clarity sake.
* | | added an integration test that checks ActionController::UnknownFormat ↵Steven Soroka2012-05-061-0/+9
| | | | | | | | | | | | renders 406 :not_acceptable
* | | Raise a rescuable exception when Rails doesn't know what to do with the ↵Steven Soroka2012-05-061-13/+19
| | | | | | | | | | | | format, rather than responding with a head :not_acceptable (406)
* | | Merge pull request #4445 from nragaz/role_based_params_wrappingJosé Valim2012-05-041-2/+15
| | | | | | | | | | | | specify a role for identifying accessible attributes when wrapping params
* | | Improve assert_template layout checkingAlexey Vakhov2012-05-041-0/+15
| | |
* | | Fix assert_template :layout => nil assertionAlexey Vakhov2012-05-041-0/+12
| | |
* | | Fix assert_template assertion with :layout optionAlexey Vakhov2012-05-041-0/+10
| | |
* | | Force given path to http methods in mapper to skip canonical action checkingCarlos Antonio da Silva2012-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following scenario: resources :contacts do post 'new', action: 'new', on: :collection, as: :new end Where the /new path is not generated because it's considered a canonical action, part of the normal resource actions: new_contacts POST /contacts(.:format) contacts#new Fixes #2999
* | | Merge pull request #6148 from twinturbo/head-fixJosé Valim2012-05-031-0/+66
|\ \ \ | | | | | | | | Make ActionController#head pass rack-link
| * | | Remove content-length as welltwinturbo2012-05-031-0/+6
| | | |
| * | | Make ActionController#head pass rack-linktwinturbo2012-05-031-0/+60
| | | |
* | | | Allows assert_redirected_to to accept a regular expressionAndy Lindeman2012-05-031-0/+4
| | | |
* | | | added proc evaluation for action cache's layout parameterNico2012-05-021-1/+32
| | | |
* | | | ActionPack: remove tests for hash_for_* methodsBogdan Gusiev2012-05-021-18/+0
|/ / /
* | | allow send_file/send_data to skip disposition header, closes #2973Sergey Nartimov2012-04-301-0/+11
| | |
* | | Add failing test case for #6053Andrew White2012-04-291-0/+21
| | |
* | | Add changelog entry for jsonp mimetype change, fix failing testCarlos Antonio da Silva2012-04-291-1/+1
| | | | | | | | | | | | Fix failing test: Mime::JS generates "text/javascript"
* | | Don't convert params if the request isn't HTML - fixes #5341Andrew White2012-04-291-2/+40
| | |
* | | Merge pull request #2321 from omjokine/masterJosé Valim2012-04-291-1/+1
|\ \ \ | | | | | | | | JSONP should use mimetype application/javascript
| * \ \ Merge remote-tracking branch 'upstream/master'Olli Jokinen2011-12-0124-181/+600
| |\ \ \
| * | | | fixed test case test_render_json_with_callback to use content_type ↵Olli Jokinen2011-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | application/javascript
* | | | | Merge session arg with existing session instead of overwritingAndrew White2012-04-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 default match without specified methodJose and Yehuda2012-04-2421-240/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
* | | | | Remove unused test code.Rafael Mendonça França2012-04-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | ActionController::RoutingError are raised in router execution time and can not be rescued in a controller.
* | | | | Merge pull request #5783 from rafaelfranca/default_url_optionsSantiago Pastorino2012-04-081-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Document that default_url_options must return a hash with symbolized keys
| * | | | | default_url_options does not receive one argument anymoreRafael Mendonça França2012-04-081-1/+1
| | | | | |
* | | | | | Revert "Merge pull request #5750 from ahoward/master"Santiago Pastorino2012-04-081-18/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 174cf8b22064c3999dfa685014d5b31ac993bb54, reversing changes made to 7ecd6a731bd60665bc6de94095137f0b2c4ada2a. The reverted commit improved the performance in the wrong place, now we have added this 6ddbd1844a6fd6aca2992f5f75c9f605cf89808f improvement.
* | | | | Merge pull request #5748 from ai/no_type_in_html5Jeremy Kemper2012-04-081-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Remove unnecessary in HTML 5 type attribute with default value
| * | | | | Remove unnecessary in HTML 5 type attribute with default valueAndrey A.I. Sitnik2012-04-051-2/+2
| | | | | |
* | | | | | Make url_for work when option is nil and default_url_options hasRafael Mendonça França2012-04-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | stringified keys
* | | | | | Merge pull request #5750 from ahoward/masterAaron Patterson2012-04-051-0/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | mo fasta and mo betta the url_for
| * | | | | | carefully and quickly merge url_for optionsara.t.howard2012-04-041-0/+9
| |/ / / / /
* | | | | | Merge pull request #4446 from ayamomiji/patch-1José Valim2012-04-051-0/+7
|\ \ \ \ \ \ | |/ / / / / |/| | | | | prevent the cache sweeper ignores NoMethodError
| * | | | | prevent the cache sweeper ignores NoMethodErrorayaya2012-03-291-0/+7
| | | | | |
* | | | | | Tests :if option of force_ssl methodAlexey Vakhov2012-04-011-0/+23
| | | | | |
* | | | | | Remove the leading \n added by textarea on assert_selectSantiago Pastorino2012-03-301-0/+7
|/ / / / /
* | | | | Set proper rendered_format when doing render :inlineSantiago Pastorino2012-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | Closes #5632
* | | | | Cover one more case in auth_token and remote formsPiotr Sarnacki2012-03-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | If embedding auth_token in remote forms is off and we pass a value for auth_token it should respect it.
* | | | | config.action_view.embed_authenticity_token_in_remote_forms is true by defaultPiotr Sarnacki2012-03-281-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed default value for `config.action_view.embed_authenticity_token_in_remote_forms` to `false`. This change breaks remote forms that need to work also without javascript, so if you need such behavior, you can either set it to `true` or explicitly pass `:authenticity_token => true` in form options
* | | | | Added config.action_view.embed_authenticity_token_in_remote_formsPiotr Sarnacki2012-03-281-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a regression introduced in 16ee611fa, which breaks remote forms that should also work without javascript. This commit introduces config option that allows to configure this behavior defaulting to the old behavior (ie. include authenticity token in remote forms by default) Conflicts: actionpack/CHANGELOG.md
* | | | | Add test for default_url_options[:port]Aaron Suggs2012-03-281-0/+12
| | | | |