mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Style
This commit is contained in:
parent
9745a2f735
commit
51f2643f40
@ -138,12 +138,12 @@ module ActiveModelSerializers
|
|||||||
def test_for_type_with_id
|
def test_for_type_with_id
|
||||||
id = 1
|
id = 1
|
||||||
actual = ResourceIdentifier.for_type_with_id('admin_user', id, {})
|
actual = ResourceIdentifier.for_type_with_id('admin_user', id, {})
|
||||||
expected = { id: "1", type: 'admin-users' }
|
expected = { id: '1', type: 'admin-users' }
|
||||||
assert_equal actual, expected
|
assert_equal actual, expected
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_for_type_with_id_given_blank_id
|
def test_for_type_with_id_given_blank_id
|
||||||
id = ""
|
id = ''
|
||||||
actual = ResourceIdentifier.for_type_with_id('admin_user', id, {})
|
actual = ResourceIdentifier.for_type_with_id('admin_user', id, {})
|
||||||
expected = { type: 'admin-users' }
|
expected = { type: 'admin-users' }
|
||||||
assert_equal actual, expected
|
assert_equal actual, expected
|
||||||
@ -154,7 +154,7 @@ module ActiveModelSerializers
|
|||||||
actual = with_jsonapi_inflection :singular do
|
actual = with_jsonapi_inflection :singular do
|
||||||
ResourceIdentifier.for_type_with_id('admin_users', id, {})
|
ResourceIdentifier.for_type_with_id('admin_users', id, {})
|
||||||
end
|
end
|
||||||
expected = { id: "2", type: 'admin-user' }
|
expected = { id: '2', type: 'admin-user' }
|
||||||
assert_equal actual, expected
|
assert_equal actual, expected
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user