re: RuboCop - replace rocket style hashes

This commit is contained in:
Alexey Dubovskoy
2016-06-20 20:58:50 +01:00
parent 004f1437d8
commit 024b2d51d3
19 changed files with 99 additions and 108 deletions

View File

@@ -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