aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/base
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-05-01 04:48:48 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-05-01 04:48:48 +0000
commit04fd94d8f8e0718687c8f4edcc9470178b5cb6ee (patch)
tree6677615bf57140e24f808aaeec980dae7a8a3a20 /activeresource/test/base
parentda257eb81ba1eab76ef2c1a256916193858418d4 (diff)
downloadrails-04fd94d8f8e0718687c8f4edcc9470178b5cb6ee.tar.gz
rails-04fd94d8f8e0718687c8f4edcc9470178b5cb6ee.tar.bz2
rails-04fd94d8f8e0718687c8f4edcc9470178b5cb6ee.zip
BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with :params and more strict usage of scopes [DHH] Added find-one with symbol [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test/base')
-rw-r--r--activeresource/test/base/custom_methods_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activeresource/test/base/custom_methods_test.rb b/activeresource/test/base/custom_methods_test.rb
index 3648e0484d..f591c14260 100644
--- a/activeresource/test/base/custom_methods_test.rb
+++ b/activeresource/test/base/custom_methods_test.rb
@@ -63,10 +63,10 @@ class CustomMethodsTest < Test::Unit::TestCase
assert_equal ActiveResource::Response.new("", 200, {}), Person.find(1).delete(:deactivate)
# With nested resources
- assert_equal StreetAddress.find(1, :person_id => 1).get(:deep),
+ assert_equal StreetAddress.find(1, :params => { :person_id => 1 }).get(:deep),
{ "id" => 1, "street" => '12345 Street', "zip" => "27519" }
assert_equal ActiveResource::Response.new("", 204, {}),
- StreetAddress.find(1, :person_id => 1).put(:normalize_phone, :locale => 'US')
+ StreetAddress.find(1, :params => { :person_id => 1 }).put(:normalize_phone, :locale => 'US')
end
def test_custom_new_element_method
@@ -82,6 +82,6 @@ class CustomMethodsTest < Test::Unit::TestCase
end
def test_find_custom_resources
- assert_equal 'Matz', Person.find(:managers).first.name
+ assert_equal 'Matz', Person.find(:all, :from => :managers).first.name
end
end \ No newline at end of file