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
28
28
end
29
29
30
30
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
33
33
yield
34
34
ensure
35
35
ActiveModel ::Serializer . config . jsonapi_resource_type = old_type
@@ -38,7 +38,7 @@ def with_jsonapi_resource_type type
38
38
def test_config_plural
39
39
with_adapter :json_api do
40
40
with_jsonapi_resource_type :plural do
41
- hash = ActiveModel ::SerializableResource . serialize ( @comment ) . serializable_hash
41
+ hash = ActiveModel ::SerializableResource . new ( @comment ) . serializable_hash
42
42
assert_equal ( 'comments' , hash [ :data ] [ :type ] )
43
43
end
44
44
end
@@ -47,7 +47,7 @@ def test_config_plural
47
47
def test_config_singular
48
48
with_adapter :json_api do
49
49
with_jsonapi_resource_type :singular do
50
- hash = ActiveModel ::SerializableResource . serialize ( @comment ) . serializable_hash
50
+ hash = ActiveModel ::SerializableResource . new ( @comment ) . serializable_hash
51
51
assert_equal ( 'comment' , hash [ :data ] [ :type ] )
52
52
end
53
53
end
You can’t perform that action at this time.
0 commit comments