aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/base_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/test/base_test.rb')
-rw-r--r--activeresource/test/base_test.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb
index 3c87ca532c..e4839613ee 100644
--- a/activeresource/test/base_test.rb
+++ b/activeresource/test/base_test.rb
@@ -17,6 +17,18 @@ class BaseTest < Test::Unit::TestCase
)
end
+
+ def test_site_accessor_accepts_uri_or_string_argument
+ site = URI.parse('http://localhost')
+
+ assert_nothing_raised { Person.site = 'http://localhost' }
+ assert_equal site, Person.site
+
+ assert_nothing_raised { Person.site = site }
+ assert_equal site, Person.site
+ end
+
+
def test_collection_name
assert_equal "people", Person.collection_name
end
@@ -57,4 +69,4 @@ class BaseTest < Test::Unit::TestCase
assert Person.find(1).destroy
assert_raises(ActiveResource::ClientError) { Person.find(2).destroy }
end
-end \ No newline at end of file
+end