mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
re: RuboCop - get rid of redundant curly braces around a hash parameter
This commit is contained in:
@@ -17,7 +17,7 @@ module ActiveModelSerializers
|
||||
@first_post = Post.new(id: 10, title: 'Hello!!', body: 'Hello, world!!')
|
||||
@second_post = Post.new(id: 20, title: 'New Post', body: 'Body')
|
||||
@third_post = Post.new(id: 30, title: 'Yet Another Post', body: 'Body')
|
||||
@blog = Blog.new({ name: 'AMS Blog' })
|
||||
@blog = Blog.new(name: 'AMS Blog')
|
||||
@first_comment = Comment.new(id: 1, body: 'ZOMG A COMMENT')
|
||||
@second_comment = Comment.new(id: 2, body: 'ZOMG ANOTHER COMMENT')
|
||||
@first_post.blog = @blog
|
||||
|
||||
@@ -13,11 +13,11 @@ module ActiveModelSerializers
|
||||
def setup
|
||||
ActionController::Base.cache_store.clear
|
||||
@array = [
|
||||
Profile.new({ id: 1, name: 'Name 1', description: 'Description 1', comments: 'Comments 1' }),
|
||||
Profile.new({ id: 2, name: 'Name 2', description: 'Description 2', comments: 'Comments 2' }),
|
||||
Profile.new({ id: 3, name: 'Name 3', description: 'Description 3', comments: 'Comments 3' }),
|
||||
Profile.new({ id: 4, name: 'Name 4', description: 'Description 4', comments: 'Comments 4' }),
|
||||
Profile.new({ id: 5, name: 'Name 5', description: 'Description 5', comments: 'Comments 5' })
|
||||
Profile.new(id: 1, name: 'Name 1', description: 'Description 1', comments: 'Comments 1'),
|
||||
Profile.new(id: 2, name: 'Name 2', description: 'Description 2', comments: 'Comments 2'),
|
||||
Profile.new(id: 3, name: 'Name 3', description: 'Description 3', comments: 'Comments 3'),
|
||||
Profile.new(id: 4, name: 'Name 4', description: 'Description 4', comments: 'Comments 4'),
|
||||
Profile.new(id: 5, name: 'Name 5', description: 'Description 5', comments: 'Comments 5')
|
||||
]
|
||||
end
|
||||
|
||||
@@ -122,7 +122,7 @@ module ActiveModelSerializers
|
||||
end
|
||||
|
||||
def test_pagination_links_with_additional_params
|
||||
adapter = load_adapter(using_will_paginate, mock_request({ test: 'test' }))
|
||||
adapter = load_adapter(using_will_paginate, mock_request(test: 'test'))
|
||||
|
||||
assert_equal expected_response_with_pagination_links_and_additional_params,
|
||||
adapter.serializable_hash
|
||||
|
||||
@@ -4,7 +4,7 @@ module ActiveModelSerializers
|
||||
module Adapter
|
||||
class NullTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
|
||||
profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
|
||||
serializer = ProfileSerializer.new(profile)
|
||||
|
||||
@adapter = Null.new(serializer)
|
||||
|
||||
Reference in New Issue
Block a user