aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_base/content_type_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in actionpack/Kir Shatrov2017-07-291-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* modernizes hash syntax in actionpackXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Deprecate :controller and :action path parametersAndrew White2016-03-011-1/+3
| | | | | | | | Allowing :controller and :action values to be specified via the path in config/routes.rb has been an underlying cause of a number of issues in Rails that have resulted in security releases. In light of this it's better that controllers and actions are explicitly whitelisted rather than trying to blacklist or sanitize 'bad' values.
* Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compatJeremy Daer2015-10-061-2/+2
| | | | | | | | | | | | | | | | | Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries that support multiple Rails versions would've had to feature-detect whether to use `Mime::Type[:FOO]` or `Mime::FOO`. `Mime[:foo]` has been around for ages to look up registered MIME types by symbol / extension, though, so libraries and plugins can safely switch to that without breaking backward- or forward-compatibility. Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup by type or extension, so it's not available as `Mime[:all]`. We use it internally as a wildcard for `respond_to` negotiation. If you use this internal constant, continue to reference it with `Mime::ALL`. Ref. efc6dd550ee49e7e443f9d72785caa0f240def53
* stop calling deprecated methodsAaron Patterson2015-09-211-2/+2
| | | | | We should be asking the mime type method for the mime objects rather than via const lookup
* Stop using deprecated `render :text` in testPrem Sichanugrist2015-07-171-9/+9
| | | | | | | | | This will silence deprecation warnings. Most of the test can be changed from `render :text` to render `:plain` or `render :body` right away. However, there are some tests that needed to be fixed by hand as they actually assert the default Content-Type returned from `render :body`.
* Consistent usage of spaces in hashes across our codebaseRafael Mendonça França2015-01-291-2/+2
|
* Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-291-2/+2
| | | | | | | | Non-kwargs requests are deprecated now. Guides are updated as well. `post url, nil, nil, { a: 'b' }` doesn't make sense. `post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
* Remove default match without specified methodJose and Yehuda2012-04-241-1/+1
| | | | | | | | | | | | | | | | 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
* removes the RJS template handlerXavier Noria2011-04-131-8/+1
|
* Fixed routes to use new API in a few more actionpack testsPiotr Sarnacki2010-09-051-3/+9
|
* Added test get to js should have a header with content-type text/javascriptSantiago Pastorino2010-04-161-1/+8
|
* Tidy up a bit this test fileSantiago Pastorino2010-04-161-7/+2
|
* Revert "Add test case which check content type when rendering rjs" partial ↵Santiago Pastorino2010-04-161-9/+1
| | | | | | in html template" rendering rjs in html doesn't make sense, it would just output javascript into the template, no script tag This reverts commit dc251389d1ab4303b80a22642f4241940b73cbe7.
* Add test case which check content type when rendering rjs partial in html ↵Stanko Alexander2010-04-131-1/+9
| | | | | | template Signed-off-by: wycats <wycats@gmail.com>
* Redraw default routes on all internal integration tests. We don't need ↵Joshua Peek2009-10-031-3/+3
| | | | SimpleRouteCase anymore
* File extra test folders into controller, dispatch, or templateJoshua Peek2009-10-031-0/+111