aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/cases/finder_test.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-17 19:30:43 -0400
committerJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-18 00:34:09 -0400
commit6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa (patch)
tree197f51ebb7b9b9c7987bb29aec73b7da9536cff7 /activeresource/test/cases/finder_test.rb
parent4a9365ee18c055d970a5f8faaac9443a8bfb0d24 (diff)
downloadrails-6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa.tar.gz
rails-6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa.tar.bz2
rails-6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa.zip
updated all the tests in ARes to work with json
Diffstat (limited to 'activeresource/test/cases/finder_test.rb')
-rw-r--r--activeresource/test/cases/finder_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activeresource/test/cases/finder_test.rb b/activeresource/test/cases/finder_test.rb
index ebb783996d..73030339a9 100644
--- a/activeresource/test/cases/finder_test.rb
+++ b/activeresource/test/cases/finder_test.rb
@@ -100,9 +100,9 @@ class FinderTest < Test::Unit::TestCase
end
def test_find_all_by_from
- ActiveResource::HttpMock.respond_to { |m| m.get "/companies/1/people.xml", {}, @people_david }
+ ActiveResource::HttpMock.respond_to { |m| m.get "/companies/1/people.json", {}, @people_david }
- people = Person.find(:all, :from => "/companies/1/people.xml")
+ people = Person.find(:all, :from => "/companies/1/people.json")
assert_equal 1, people.size
assert_equal "David", people.first.name
end
@@ -116,7 +116,7 @@ class FinderTest < Test::Unit::TestCase
end
def test_find_all_by_symbol_from
- ActiveResource::HttpMock.respond_to { |m| m.get "/people/managers.xml", {}, @people_david }
+ ActiveResource::HttpMock.respond_to { |m| m.get "/people/managers.json", {}, @people_david }
people = Person.find(:all, :from => :managers)
assert_equal 1, people.size
@@ -124,14 +124,14 @@ class FinderTest < Test::Unit::TestCase
end
def test_find_single_by_from
- ActiveResource::HttpMock.respond_to { |m| m.get "/companies/1/manager.xml", {}, @david }
+ ActiveResource::HttpMock.respond_to { |m| m.get "/companies/1/manager.json", {}, @david }
- david = Person.find(:one, :from => "/companies/1/manager.xml")
+ david = Person.find(:one, :from => "/companies/1/manager.json")
assert_equal "David", david.name
end
def test_find_single_by_symbol_from
- ActiveResource::HttpMock.respond_to { |m| m.get "/people/leader.xml", {}, @david }
+ ActiveResource::HttpMock.respond_to { |m| m.get "/people/leader.json", {}, @david }
david = Person.find(:one, :from => :leader)
assert_equal "David", david.name