mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
re: RuboCop - replace rocket style hashes
This commit is contained in:
@@ -23,7 +23,7 @@ module ActiveModelSerializers
|
||||
assert_equal serializable_resource.serializer_instance.object, @resource
|
||||
|
||||
expected_errors_object = {
|
||||
:errors => [
|
||||
errors: [
|
||||
{
|
||||
source: { pointer: '/data/attributes/name' },
|
||||
detail: 'cannot be nil'
|
||||
@@ -48,10 +48,10 @@ module ActiveModelSerializers
|
||||
assert_equal serializable_resource.serializer_instance.object, @resource
|
||||
|
||||
expected_errors_object = {
|
||||
:errors => [
|
||||
{ :source => { :pointer => '/data/attributes/name' }, :detail => 'cannot be nil' },
|
||||
{ :source => { :pointer => '/data/attributes/name' }, :detail => 'must be longer' },
|
||||
{ :source => { :pointer => '/data/attributes/id' }, :detail => 'must be a uuid' }
|
||||
errors: [
|
||||
{ source: { pointer: '/data/attributes/name' }, detail: 'cannot be nil' },
|
||||
{ source: { pointer: '/data/attributes/name' }, detail: 'must be longer' },
|
||||
{ source: { pointer: '/data/attributes/id' }, detail: 'must be a uuid' }
|
||||
]
|
||||
}
|
||||
assert_equal serializable_resource.as_json, expected_errors_object
|
||||
|
||||
Reference in New Issue
Block a user