mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Make test attributes explicit
- Organize test poros with associations and by serializer - Freeze derived attributes/associations against mutation - Cleanup PORO fixtures
This commit is contained in:
@@ -4,7 +4,7 @@ module ActiveModelSerializers
|
||||
module Adapter
|
||||
class JsonApi
|
||||
class LinksTest < ActiveSupport::TestCase
|
||||
class LinkAuthor < ::Model; end
|
||||
class LinkAuthor < ::Model; associations :posts end
|
||||
class LinkAuthorSerializer < ActiveModel::Serializer
|
||||
link :self do
|
||||
href "http://example.com/link_author/#{object.id}"
|
||||
|
||||
Reference in New Issue
Block a user