Fix typo in TelSelections and fix local inv test
Amolith
created 2 years ago
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 <amolith@secluded.site>
Change summary
Gemfile | 2 +-
lib/tel_selections.rb | 5 ++---
test/test_registration.rb | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
Detailed changes
@@ -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"
@@ -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
@@ -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(