From 75017ef201b8e0de64559f4613e0ce8e8fdc34fb Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Fri, 10 Nov 2023 17:53:06 +0000 Subject: [PATCH] Refs #36849 - Remove deprecated URI.{encode,decode} These are dropped in Ruby 3.0 --- test/unit/tasks/interfaces_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/tasks/interfaces_test.rb b/test/unit/tasks/interfaces_test.rb index d4aa0044673..4fa69fa36eb 100644 --- a/test/unit/tasks/interfaces_test.rb +++ b/test/unit/tasks/interfaces_test.rb @@ -34,7 +34,7 @@ class InterfacesTest < ActiveSupport::TestCase end assert_match /cleaned 0 interfaces/, stdout - encoded_hostname = URI.encode("(#{host.name})") + encoded_hostname = CGI.escape("(#{host.name})") assert_match /#{encoded_hostname}/, stdout assert_match /ignored interface set as primary/, stdout end @@ -49,9 +49,9 @@ class InterfacesTest < ActiveSupport::TestCase end assert_match /cleaned 0 interfaces/, stdout - encoded_hostname = URI.encode("(#{host.name})") + encoded_hostname = CGI.escape("(#{host.name})") assert_match /#{encoded_hostname}/, stdout - query = URI.decode(stdout.match(/^.*search=(.*?%29)/)[1]).tr('+', ' ') + query = CGI.unescape(stdout.match(/^.*search=(.*?%29)/)[1]).tr('+', ' ') assert_equal host.id, Host.search_for(query).first.id assert_match /ignored interface set as provision/, stdout end