Skip to content

Commit 890003b

Browse files
committed
Minor style improvements.
1 parent ebb0595 commit 890003b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/adapter/json_api/resource_type_config_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)