Return empty hash when url_options not provided

This commit is contained in:
Alex Kwiatkowski & Will Bagby
2012-08-07 12:56:58 -04:00
parent dd5cdb6ddb
commit 754aa295ba
2 changed files with 7 additions and 1 deletions

View File

@@ -143,6 +143,12 @@ class SerializerTest < ActiveModel::TestCase
assert_equal({ :host => "test.local" }, user_serializer.url_options)
end
def test_serializer_returns_empty_hash_without_url_options
user = User.new
user_serializer = UserSerializer.new(user)
assert_equal({}, user_serializer.url_options)
end
def test_pretty_accessors
user = User.new
user.superuser = true