From 53e2a3a6f586cda4719091e046eac17aac6b30fb Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 3 Mar 2026 08:40:14 -0500 Subject: [PATCH] Stop showing "included" credit for now it mostly just confuses people --- forms/plan_info.rb | 6 ---- test/test_customer_info.rb | 56 -------------------------------------- 2 files changed, 62 deletions(-) diff --git a/forms/plan_info.rb b/forms/plan_info.rb index 18d68e843e5475e4beeb378649dbe6f668d09dc9..bbc3ddb7ad55862c2f449d7d842f35d13852d5ec 100644 --- a/forms/plan_info.rb +++ b/forms/plan_info.rb @@ -1,9 +1,3 @@ -field( - var: "remaining_included_calling_credit", - label: "Remaining Included Calling Credit", - value: "$%.4f" % @plan_info.remaining_included_calling_credit -) - if @admin_info field( var: "plan", diff --git a/test/test_customer_info.rb b/test/test_customer_info.rb index c8d1094c354918c386fe02de29017a58bc86e145..efe50f8d4faf9a3b706f34463a4f89f1e8626dfb 100644 --- a/test/test_customer_info.rb +++ b/test/test_customer_info.rb @@ -44,62 +44,6 @@ class CustomerInfoTest < Minitest::Test end em :test_info_does_not_crash - def test_info_has_remaining_included_calling_credit - sgx = Minitest::Mock.new - sgx.expect(:registered?, false) - - CustomerPlan::DB.expect( - :query_one, - EMPromise.resolve({ start_date: Time.now }), - [String, "test"] - ) - - CustomerUsage::DB.expect( - :query_one, - EMPromise.resolve({ charges: 0.044.to_d }), - [String, "test"] - ) - - cust = customer(sgx: sgx, plan_name: "test_usd") - - assert_equal( - "$1.0000", - CustomerInfo.for(cust).sync.form - .field("remaining_included_calling_credit").value - ) - assert_mock sgx - assert_mock CustomerUsage::DB - end - em :test_info_has_remaining_included_calling_credit - - def test_info_out_of_remaining_included_calling_credit - sgx = Minitest::Mock.new - sgx.expect(:registered?, false) - - CustomerPlan::DB.expect( - :query_one, - EMPromise.resolve({ start_date: Time.now }), - [String, "test"] - ) - - CustomerUsage::DB.expect( - :query_one, - EMPromise.resolve({ charges: 10.to_d }), - [String, "test"] - ) - - cust = customer(sgx: sgx, plan_name: "test_usd") - - assert_equal( - "$0.0000", - CustomerInfo.for(cust).sync.form - .field("remaining_included_calling_credit").value - ) - assert_mock sgx - assert_mock CustomerUsage::DB - end - em :test_info_out_of_remaining_included_calling_credit - def test_admin_info_does_not_crash sgx = Minitest::Mock.new sgx.expect(:registered?, false)