20846: Fix kwargs variable name.
authorTom Clegg <tom@curii.com>
Tue, 31 Oct 2023 14:29:55 +0000 (10:29 -0400)
committerTom Clegg <tom@curii.com>
Tue, 31 Oct 2023 14:44:57 +0000 (10:44 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

services/api/test/test_helper.rb

index e907367446a9d676c4e965b845991de8fbe425dd..0255d8907da1ad7ee0e036509c9a19b693bdfe9c 100644 (file)
@@ -179,21 +179,21 @@ class ActionController::TestCase
   end
 
   [:get, :post, :put, :patch, :delete].each do |method|
-    define_method method do |action, **args|
+    define_method method do |action, **kwargs|
       check_counter action
       # After Rails 5.0 upgrade, some params don't get properly serialized.
       # One case are filters: [['attr', 'op', 'val']] become [['attr'], ['op'], ['val']]
       # if not passed upstream as a JSON string.
-      if args[:params].is_a?(Hash)
-        args[:params].each do |key, _|
+      if kwargs[:params].is_a?(Hash)
+        kwargs[:params].each do |key, _|
           next if key == :exclude_script_versions # Job Reuse tests
           # Keys could be: :filters, :where, etc
-          if [Array, Hash].include?(args[:params][key].class)
-            args[:params][key] = SafeJSON.dump(args[:params][key])
+          if [Array, Hash].include?(kwargs[:params][key].class)
+            kwargs[:params][key] = SafeJSON.dump(kwargs[:params][key])
           end
         end
       end
-      super action, **args
+      super action, **kwargs
     end
   end