mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
re: RuboCop - replace rocket style hashes
This commit is contained in:
@@ -8,12 +8,11 @@ module ActionController
|
||||
get :render_resource_with_errors
|
||||
|
||||
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' }
|
||||
]
|
||||
}.to_json
|
||||
assert_equal json_reponse_body.to_json, expected_errors_object
|
||||
end
|
||||
|
||||
@@ -87,7 +87,7 @@ module ActionController
|
||||
setup do
|
||||
@routes = Rails.application.routes.draw do
|
||||
ActiveSupport::Deprecation.silence do
|
||||
match ':action', :to => LinkedTestController, via: [:get, :post]
|
||||
match ':action', to: LinkedTestController, via: [:get, :post]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user