aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/webservice_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Lint/UselessAssignment` cop to avoid unused variable warnings (#34904)Ryuta Kamizono2019-01-091-3/+3
| | | | | | | | | | | | | | * Enable `Lint/UselessAssignment` cop to avoid unused variable warnings Since we've addressed the warning "assigned but unused variable" frequently. 370537de05092aeea552146b42042833212a1acc 3040446cece8e7a6d9e29219e636e13f180a1e03 5ed618e192e9788094bd92c51255dda1c4fd0eae 76ebafe594fc23abc3764acc7a3758ca473799e5 And also, I've found the unused args in c1b14ad which raises no warnings by the cop, it shows the value of the cop.
* Make actionpack frozen string friendlyKir Shatrov2017-07-241-2/+4
|
* 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
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-1/+1
|
* modernizes hash syntax in actionpackXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-23/+23
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Transform the mime object to symbol when registering the parsersRafael Mendonça França2016-02-221-1/+1
| | | | | This will keep our current API working without having the users to change their codebases.
* Use symbol of mime type instead of object to get correct parserMehmet Emin İNAÇ2016-02-221-2/+2
| | | | | | After registering new `:json` mime type `parsers.fetch` can't find the mime type because new mime type is not equal to old one. Using symbol of the mime type as key on parsers hash solves the problem. Closes #23766
* 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
* do not instantiate a param parser middlewareAaron Patterson2015-09-181-8/+12
| | | | | | we don't actually need a param parser middleware instance since the request object will take care of parsing parameters for us. For now, we'll just configure the parameter parsers on the request in this class.
* Stop using deprecated `render :text` in testPrem Sichanugrist2015-07-171-2/+2
| | | | | | | | | 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`.
* Make AC::Parameters not inherited from HashPrem Sichanugrist2015-07-151-1/+7
| | | | | | | | This is another take at #14384 as we decided to wait until `master` is targeting Rails 5.0. This commit is implementation-complete, as it guarantees that all the public methods on the hash-inherited Parameters are still working (based on test case). We can decide to follow-up later if we want to remove some methods out from Parameters.
* Consistent usage of spaces in hashes across our codebaseRafael Mendonça França2015-01-291-5/+5
|
* Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-291-7/+16
| | | | | | | | 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
* Do not rescue Exception in ParamsParserYuki Nishijima2014-11-231-0/+10
| | | | | Unlike ShowExceptions or PublicExceptions, ParamsParser shouldn't transform exceptions like Interrupt and NoMemoryError into ParserError.
* Eliminate `JSON.{parse,load,generate,dump}` and `def to_json`Godfrey Chan2013-11-051-1/+2
| | | | | | | | | | | | | | | JSON.{dump,generate} offered by the JSON gem is not compatiable with Rails at the moment and can cause a lot of subtle bugs when passed certain data structures. This changed all direct usage of the JSON gem in internal Rails code to always go through AS::JSON.{decode,encode}. We also shouldn't be implementing `to_json` most of the time, and these occurances are replaced with an equivilent `as_json` implementation to avoid problems down the road. See [1] for all the juicy details. [1]: intridea/multi_json#138 (comment)
* Remove XML Parser from ActionDispatchPrem Sichanugrist2013-02-201-131/+15
| | | | | If you want an ability to parse XML parameters, please install `actionpack-xml_parser` gem.
* Remove yaml Proc param parser testBrendon Murphy2013-01-281-13/+0
| | | | | | | | I don't believe this test is exercising any explicit params_parser behavior that the other two Proc tests aren't already doing. Given that we now know it's a bad idea to load user input via YAML.load, somebody reading this test might get a dangerous idea about building out a YAML params parser.
* Remove :yaml related tests and fix other related to parsing empty arraysCarlos Antonio da Silva2013-01-081-43/+0
| | | | All Action Pack tests are green.
* CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-0/+13
|
* Revert "Merge branch 'master-sec'"Jeremy Kemper2013-01-081-13/+0
| | | | | This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing changes made to f049016cd348627bf8db0d72382d7580bf802a79.
* CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-0/+13
|
* 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
* Remove rescue_action from compatibility module and testsCarlos Antonio da Silva2012-01-171-2/+0
|
* try not to use assert_blank when nil will wouldNeeraj Singh2011-06-111-2/+2
| | | | | | be considered as failure Test for specific value to the extent possible
* use spec compliant YAMLAaron Patterson2011-01-211-1/+1
|
* Initialize ivars in tests.Emilio Tagua2010-09-281-0/+1
|
* Remove deprecated stuff in ActionControllerCarlos Antonio da Silva2010-09-261-1/+1
| | | | | | This removes all deprecated classes in ActionController related to Routing, Abstract Request/Response and Integration/IntegrationTest. All tests and docs were changed to ActionDispatch instead of ActionController.
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-051-1/+1
|
* code gardening: we have assert_(nil|blank|present), more concise, with ↵Xavier Noria2010-08-171-2/+2
| | | | better default failure messages - let's use them
* Consistent routing languageJoshua Peek2010-03-301-1/+1
|
* Merge branch 'master' of github.com:rails/railsCarlhuda2010-02-251-1/+1
|
* Use ActionDispatch::Routing everywhereMartin Schürrer2010-02-211-1/+1
|
* Use new routing dsl in testsJoshua Peek2009-12-081-3/+1
|
* Add custom "with_routing" to internal tests to fix reseting session after usingJoshua Peek2009-10-031-1/+0
| | | | with_routing. This only affects our internal AP tests.
* Allow integration test rack app to be set with "@app" ivar instead of using ↵Joshua Peek2009-09-261-2/+2
| | | | open_session
* Reset session in integration tests after changing routes to reload the ↵Joshua Peek2009-08-271-0/+1
| | | | middleware stack
* Move legacy param_parsers config onto AD::ParamsParserJoshua Peek2009-08-211-62/+67
|
* Move Safari response-padding fix to Rails2Compatibility. Should be a Rack ↵Jeremy Kemper2009-05-211-2/+2
| | | | concern.
* Switch to Rack based session stores.Joshua Peek2008-12-151-2/+0
|
* Refactor SessionFixationTest and WebServiceTest with IntegrationTest so they ↵Joshua Peek2008-12-041-144/+178
| | | | are compatible with the Rack interface.
* Remove XmlSimple dependenciesJeremy Kemper2008-11-251-5/+4
|
* Fix Hash#from_xml with Type records. Closes #9242 [Juanjo Bazan, Isaac Feliu]Jeremy Kemper2008-02-271-2/+47
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Parse url-encoded and multipart requests ourselves instead of delegating to CGI.Jeremy Kemper2007-05-181-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce the request.body stream. Lazy-read to parse parameters rather than ↵Jeremy Kemper2007-05-151-7/+3
| | | | | | always setting RAW_POST_DATA. Reduces the memory footprint of large binary PUT requests. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6740 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed ill faded xml_node class from codebase. Use XmlSimple insteadTobias Lütke2007-04-091-57/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: remove deprecated request methods.Jeremy Kemper2007-03-131-9/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de