mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove 'Adapter' suffix from adapters since they are in Adapter:: namespace
This commit is contained in:
@@ -3,7 +3,7 @@ require 'test_helper'
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class Adapter
|
||||
class JsonApiAdapter
|
||||
class JsonApi
|
||||
class BelongsToTest < Minitest::Test
|
||||
def setup
|
||||
@post = Post.new(id: 42, title: 'New Post', body: 'Body')
|
||||
@@ -12,7 +12,7 @@ module ActiveModel
|
||||
@comment.post = @post
|
||||
|
||||
@serializer = CommentSerializer.new(@comment)
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApiAdapter.new(@serializer)
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer)
|
||||
end
|
||||
|
||||
def test_includes_post_id
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'test_helper'
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class Adapter
|
||||
class JsonApiAdapter
|
||||
class JsonApi
|
||||
class HasManyTest < Minitest::Test
|
||||
def setup
|
||||
@post = Post.new(title: 'New Post', body: 'Body')
|
||||
|
||||
@@ -8,7 +8,7 @@ module ActiveModel
|
||||
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
|
||||
@profile_serializer = ProfileSerializer.new(@profile)
|
||||
|
||||
@adapter = JsonAdapter.new(@profile_serializer)
|
||||
@adapter = Json.new(@profile_serializer)
|
||||
end
|
||||
|
||||
def test_serializable_hash
|
||||
@@ -3,12 +3,12 @@ require 'test_helper'
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class Adapter
|
||||
class NullAdapterTest < Minitest::Test
|
||||
class NullTest < Minitest::Test
|
||||
def setup
|
||||
profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
|
||||
serializer = ProfileSerializer.new(profile)
|
||||
|
||||
@adapter = NullAdapter.new(serializer)
|
||||
@adapter = Null.new(serializer)
|
||||
end
|
||||
|
||||
def test_serializable_hash
|
||||
Reference in New Issue
Block a user