diff --git a/test/adapter_test.rb b/test/adapter_test.rb index 7268c386f..3349d8a76 100644 --- a/test/adapter_test.rb +++ b/test/adapter_test.rb @@ -38,6 +38,15 @@ def test_create_adapter_with_override adapter = ActiveModel::Serializer::Adapter.create(@serializer, { adapter: :json_api}) assert_equal ActiveModel::Serializer::Adapter::JsonApi, adapter.class end + + def test_inflected_adapter_class_for_known_adapter + ActiveSupport::Inflector.inflections(:en){|inflect| inflect.acronym 'API' } + klass = ActiveModel::Serializer::Adapter.adapter_class(:json_api) + + ActiveSupport::Inflector.inflections.acronyms.clear + + assert_equal ActiveModel::Serializer::Adapter::JsonApi, klass + end end end end