aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/cases/finder_test.rb
diff options
context:
space:
mode:
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