From 840298731c485d719f41685788e88d4500e3535f Mon Sep 17 00:00:00 2001 From: Amolith Date: Fri, 8 Dec 2023 16:36:56 -0500 Subject: [PATCH] Fix typo in TelSelections and fix local inv test Minitest 5.19.0 introduced a change that breaks the latest version of rantly. I've forked rantly, added a require that fixes the issue, and opened a PR upstream. Until rantly's updated, the Gemfile requires my fork instead of upstream. Signed-off-by: Amolith --- Gemfile | 2 +- lib/tel_selections.rb | 5 ++--- test/test_registration.rb | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 6f71d1b699e258de52bfdff399b0d0972ccbede9..72c242c7e1d3d9f6581af4c02e9e8613b90f0380 100644 --- a/Gemfile +++ b/Gemfile @@ -39,7 +39,7 @@ group(:test) do gem "minitest", ">= 5.16.0" gem "rack-test" gem "rake" - gem "rantly" + gem "rantly", git: "https://github.com/Amolith/rantly.git", branch: "master" gem "rubocop", "= 0.89.1" gem "simplecov", require: false gem "webmock" diff --git a/lib/tel_selections.rb b/lib/tel_selections.rb index 8c0df302157a6fca1a4ca4a64eb2cecee6026333..94cf00823ecccb6ace6492402c632266c7120307 100644 --- a/lib/tel_selections.rb +++ b/lib/tel_selections.rb @@ -214,9 +214,8 @@ class TelSelections def self.for_pending_value(value) if value.start_with?("LocalInventory/") - LocalInventory.new( - *Tn.new(value.sub(/\ALocalInventory\//, "")).split("/", 2) - ) + tel, account = value.sub(/\ALocalInventory\//, "").split("/", 2) + LocalInventory.new(Tn.new(tel), account) else Bandwidth.new(Tn.new(value)) end diff --git a/test/test_registration.rb b/test/test_registration.rb index 38512038e649246634f79bd0d8f6a88def1aab3a..d8e851338476742611beabb0c19118156b3adfe6 100644 --- a/test/test_registration.rb +++ b/test/test_registration.rb @@ -1532,7 +1532,7 @@ class RegistrationTest < Minitest::Test ) Registration::Finish::DB.expect( :exec_defer, - EMPromise.resolve(nil), + EMPromise.resolve(OpenStruct.new(cmd_tuples: 1)), [String, ["+15555550000"]] ) Bwmsgsv2Repo::REDIS.expect(