aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/cases/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Failing test: ActiveResource shouldn't rely on the presence of Content-LengthJohn Mileham2011-09-091-3/+27
|
* updated all the tests in ARes to work with jsonJosh Kalderimis2011-05-181-54/+61
|
* Active Resource typos.R.T. Lechow2011-03-051-1/+1
|
* Make ARes tests unescape [ and ]Santiago Pastorino2010-11-181-3/+3
|
* Fix broken module namespacing in ActiveResource with Ruby 1.9 [#5699 ↵Matthijs Langenberg2010-09-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | state:resolved] Following namespace use case was broken with Ruby 1.9: class Author < ActiveRecord::Base ... end module Api class Book < ActiveResouce::Base end end Let's say XML contains <book><author><name>John</name></author>.... Api::Book.first.author.class.to_s #=> Ruby 1.8.7: "Api::Book::Author" (namespaced, correct), Ruby 1.9: "Author" (toplevel, broken) Signed-off-by: José Valim <jose.valim@gmail.com>
* - check prefix options in collection_pathGaston Ramos2010-09-271-1/+7
|
* - better name for prefix param test caseGaston Ramos2010-09-271-1/+1
|
* - elmenth_path raise an ActiveResource::MissingPrefixParam exception when ↵Gaston Ramos2010-09-271-0/+8
| | | | | | | prefix_options does not has all required prefix_options ex: class StreetAddress < ActiveResource::Base self.site = "http://37s.sunrise.i:3000/people/:person_id/" end StreetAddress.element_path(1) # => ActiveResource::MissingPrefixParam
* Fix active_resource assertions.José Valim2010-09-251-2/+2
|
* Allow ActiveResource to work with non-generated ids [#5660 state:resolved]Jacques Crocker2010-09-251-0/+49
| | | | | | This commit updates new? so that it knows whether or not the record was actually new or not, and doesn't rely solely on the presence of id. This enables the ability to set a custom primary_key that is not autogenerated by the server. Signed-off-by: José Valim <jose.valim@gmail.com>
* test for #5038Neeraj Singh2010-09-181-0/+8
|
* Refactor setup methods by extracting them in abstract_unit, remove TODO.Emilio Tagua2010-09-171-95/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveModel#to_xml fix (renamed parameter).Andreas Garnæs2010-09-021-0/+6
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* fix escaping id and parameters in path [#5137 state:resolved]Josef Reidinger2010-07-261-0/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* These tests are trusting in the order of the elements so use OrderedHash ↵Santiago Pastorino2010-07-211-1/+2
| | | | instead of Hash
* edit pass: the names of Rails components have a space, ie, "Active Record", ↵Xavier Noria2010-06-141-1/+1
| | | | not "ActiveRecord"
* Adding to_key to ActiveResource objects using ActiveModel::Conversion [#4685 ↵Elomar França2010-05-261-0/+7
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Replace assert with assert_equal in some test casesNeeraj Singh2010-05-211-3/+3
| | | | | | [#4654 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Final iteration of use better testing methodsNeeraj Singh2010-05-191-5/+5
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* assert should be replaced with assert_equal in a particular test caseNeeraj Singh2010-05-181-1/+1
| | | | | | [#4636 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveResource shouldn't consider modules in the pathSantiago Pastorino2010-05-151-0/+5
| | | | | | [#4529 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Make ActiveResource serialize XML correctly when element_name is set.Santiago Pastorino2010-05-121-0/+36
| | | | | | [#4529] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make use of to_xml and to_json in testsSantiago Pastorino2010-05-121-2/+7
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Reuse Active Model serialization in Active Resource. [#2584 state:committed]Santiago Pastorino2010-04-261-6/+22
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "create option to include_root_in_json for ActiveResource [#2584 ↵Jeremy Kemper2010-04-251-23/+6
| | | | | | | | | | state:committed]" This reverts commits 72f89b5d971b48a133c4c0af56fbeda35d738dae, 137d8e0b2fe9fcc4fdac6cbbd44ca010784e5972. Should reuse Active Model. [#2584 state:incomplete]
* Make this test pass on > 1.9Santiago Pastorino2010-04-191-1/+5
|
* create option to include_root_in_json for ActiveResource [#2584 state:committed]Santiago Pastorino2010-04-051-6/+19
|
* Fix failing specYehuda Katz2010-02-081-0/+5
|
* method_missing errors on activeresource tests, mocha is not required thereSantiago Pastorino2010-02-051-0/+1
| | | | | | [#3825 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Reorganize autoloads:Carlhuda2009-12-021-3/+3
| | | | | | | | | | | | | | | | | | | | | * A new module (ActiveSupport::Autoload) is provide that extends autoloading with new behavior. * All autoloads in modules that have extended ActiveSupport::Autoload will be eagerly required in threadsafe environments * Autoloads can optionally leave off the path if the path is the same as full_constant_name.underscore * It is possible to specify that a group of autoloads live under an additional path. For instance, all of ActionDispatch's middlewares are ActionDispatch::MiddlewareName, but they live under "action_dispatch/middlewares/middleware_name" * It is possible to specify that a group of autoloads are all found at the same path. For instance, a number of exceptions might all be declared there. * One consequence of this is that testing-related constants are not autoloaded. To get the testing helpers for a given component, require "component_name/test_case". For instance, "action_controller/test_case". * test_help.rb, which is automatically required by a Rails application's test helper, requires the test_case.rb for all active components, so this change will not be disruptive in existing or new applications.
* Digest auth option for ActiveResource.pivotal2009-10-151-0/+6
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Cleanup whitespace introduced in 8377646 and f4f6888Joshua Peek2009-10-021-4/+4
|
* add indifferent access to the attributesTaryn East2009-10-021-0/+15
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* update_attribute(s) added to Active ResourceTaryn East2009-10-021-2/+51
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Added save! which raises ResourceInvalid unless valid?taryn2009-08-191-1/+7
| | | | | | | | | | | | | | | Similar to Active Record - it will raise ActiveResouce::ResourceInvalid if the resource is not valid (ie if <tt>valid?</tt> returns false) However - does not raise ActiveResource::ResourceNotFound if the callbacks fail (callbacks have not yet been implemented) - it will just try to save and raise if the callbacks all fail. This is not ideal behaviour - but will do until we decide to change the behaviour of save_with_validations to actually raise (rather than catch) the ResourceInvalid exception. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Pulled find-based tests into their own test case. This matches Active ↵taryn2009-08-191-76/+0
| | | | | | Record, and allows us to have one places where all find-tests are located, which will help when adding dynamic finders later. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Moved all test cases into a new test/cases directory to match Active Record ↵taryn2009-08-191-0/+1039
test directory structure. Signed-off-by: Joshua Peek <josh@joshpeek.com>