File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ def setup
2828 end
2929
3030 def with_jsonapi_resource_type type
31- old_type = ActiveModel ::Serializer . config [ : jsonapi_resource_type]
32- ActiveModel ::Serializer . config [ : jsonapi_resource_type] = type
31+ old_type = ActiveModel ::Serializer . config . jsonapi_resource_type
32+ ActiveModel ::Serializer . config . jsonapi_resource_type = type
3333 yield
3434 ensure
3535 ActiveModel ::Serializer . config . jsonapi_resource_type = old_type
@@ -38,7 +38,7 @@ def with_jsonapi_resource_type type
3838 def test_config_plural
3939 with_adapter :json_api do
4040 with_jsonapi_resource_type :plural do
41- hash = ActiveModel ::SerializableResource . serialize ( @comment ) . serializable_hash
41+ hash = ActiveModel ::SerializableResource . new ( @comment ) . serializable_hash
4242 assert_equal ( 'comments' , hash [ :data ] [ :type ] )
4343 end
4444 end
@@ -47,7 +47,7 @@ def test_config_plural
4747 def test_config_singular
4848 with_adapter :json_api do
4949 with_jsonapi_resource_type :singular do
50- hash = ActiveModel ::SerializableResource . serialize ( @comment ) . serializable_hash
50+ hash = ActiveModel ::SerializableResource . new ( @comment ) . serializable_hash
5151 assert_equal ( 'comment' , hash [ :data ] [ :type ] )
5252 end
5353 end
You can’t perform that action at this time.
0 commit comments