mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Return empty hash when url_options not provided
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user