File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -289,11 +289,12 @@ class NoDuplicatesTest < Minitest::Test
289
289
290
290
class PostSerializer < ActiveModel ::Serializer
291
291
type 'posts'
292
- class AuthorSerializer < ActiveModel ::Serializer
293
- type 'authors'
294
- has_many :posts , serializer : PostSerializer
295
- end
296
- belongs_to :author , serializer : AuthorSerializer
292
+ belongs_to :author
293
+ end
294
+
295
+ class AuthorSerializer < ActiveModel ::Serializer
296
+ type 'authors'
297
+ has_many :posts
297
298
end
298
299
299
300
def setup
@@ -313,7 +314,6 @@ def setup
313
314
314
315
def test_no_duplicates
315
316
hash = ActiveModel ::SerializableResource . new ( @post1 , adapter : :json_api ,
316
- serializer : PostSerializer ,
317
317
include : '*.*' )
318
318
. serializable_hash
319
319
expected = [
@@ -343,7 +343,6 @@ def test_no_duplicates
343
343
def test_no_duplicates_collection
344
344
hash = ActiveModel ::SerializableResource . new (
345
345
[ @post1 , @post2 ] , adapter : :json_api ,
346
- each_serializer : PostSerializer ,
347
346
include : '*.*' )
348
347
. serializable_hash
349
348
expected = [
You can’t perform that action at this time.
0 commit comments