mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Add URL to serializers (closes #61)
Thanks so much to @vanstee for the initial implementation!
This commit is contained in:
@@ -132,6 +132,12 @@ class SerializerTest < ActiveModel::TestCase
|
||||
}, hash)
|
||||
end
|
||||
|
||||
def test_serializer_receives_url_options
|
||||
user = User.new
|
||||
user_serializer = UserSerializer.new(user, :url_options => { :host => "test.local" })
|
||||
assert_equal({ :host => "test.local" }, user_serializer.url_options)
|
||||
end
|
||||
|
||||
def test_pretty_accessors
|
||||
user = User.new
|
||||
user.superuser = true
|
||||
|
||||
Reference in New Issue
Block a user