diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6c5f376c..5635de43 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -9,14 +9,4 @@ -# Offense count: 3 -# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. -# NamePrefix: is_, has_, have_ -# NamePrefixBlacklist: is_, has_, have_ -# NameWhitelist: is_a? -Style/PredicateName: - Exclude: - - 'lib/active_model/serializer/associations.rb' - - 'test/action_controller/json_api/linked_test.rb' - diff --git a/test/action_controller/json_api/linked_test.rb b/test/action_controller/json_api/linked_test.rb index efcf4d99..12019768 100644 --- a/test/action_controller/json_api/linked_test.rb +++ b/test/action_controller/json_api/linked_test.rb @@ -183,17 +183,17 @@ module ActionController get '/render_resource_with_missing_nested_has_many_include' response = JSON.parse(@response.body) assert response.key? 'included' - refute has_type?(response['included'], 'roles') + refute include_type?(response['included'], 'roles') end def test_render_collection_with_missing_nested_has_many_include get '/render_collection_with_missing_nested_has_many_include' response = JSON.parse(@response.body) assert response.key? 'included' - assert has_type?(response['included'], 'roles') + assert include_type?(response['included'], 'roles') end - def has_type?(collection, value) + def include_type?(collection, value) collection.detect { |i| i['type'] == value } end end