File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
test/action_controller/json_api Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 99
1010
1111
12- # Offense count: 3
13- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
14- # NamePrefix: is_, has_, have_
15- # NamePrefixBlacklist: is_, has_, have_
16- # NameWhitelist: is_a?
17- Style/PredicateName :
18- Exclude :
19- - ' lib/active_model/serializer/associations.rb'
20- - ' test/action_controller/json_api/linked_test.rb'
21-
2212
Original file line number Diff line number Diff line change @@ -183,17 +183,17 @@ def test_render_resource_with_nested_attributes_even_when_missing_associations
183183 get '/render_resource_with_missing_nested_has_many_include'
184184 response = JSON . parse ( @response . body )
185185 assert response . key? 'included'
186- refute has_type ?( response [ 'included' ] , 'roles' )
186+ refute include_type ?( response [ 'included' ] , 'roles' )
187187 end
188188
189189 def test_render_collection_with_missing_nested_has_many_include
190190 get '/render_collection_with_missing_nested_has_many_include'
191191 response = JSON . parse ( @response . body )
192192 assert response . key? 'included'
193- assert has_type ?( response [ 'included' ] , 'roles' )
193+ assert include_type ?( response [ 'included' ] , 'roles' )
194194 end
195195
196- def has_type ?( collection , value )
196+ def include_type ?( collection , value )
197197 collection . detect { |i | i [ 'type' ] == value }
198198 end
199199 end
You can’t perform that action at this time.
0 commit comments