From eccb359cb94ef7394ec48a2762b2ee47574230ee Mon Sep 17 00:00:00 2001 From: Lucas Hosseini Date: Thu, 8 Oct 2015 18:13:58 +0200 Subject: [PATCH] Fix unnecessary nested serializers. --- test/adapter/json_api/linked_test.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/adapter/json_api/linked_test.rb b/test/adapter/json_api/linked_test.rb index 0bc3073c..ead5d576 100644 --- a/test/adapter/json_api/linked_test.rb +++ b/test/adapter/json_api/linked_test.rb @@ -289,11 +289,12 @@ module ActiveModel class PostSerializer < ActiveModel::Serializer type 'posts' - class AuthorSerializer < ActiveModel::Serializer - type 'authors' - has_many :posts, serializer: PostSerializer - end - belongs_to :author, serializer: AuthorSerializer + belongs_to :author + end + + class AuthorSerializer < ActiveModel::Serializer + type 'authors' + has_many :posts end def setup @@ -313,7 +314,6 @@ module ActiveModel def test_no_duplicates hash = ActiveModel::SerializableResource.new(@post1, adapter: :json_api, - serializer: PostSerializer, include: '*.*') .serializable_hash expected = [ @@ -343,7 +343,6 @@ module ActiveModel def test_no_duplicates_collection hash = ActiveModel::SerializableResource.new( [@post1, @post2], adapter: :json_api, - each_serializer: PostSerializer, include: '*.*') .serializable_hash expected = [