M lib/call_attempt_repo.rb => lib/call_attempt_repo.rb +1 -1
@@ 52,7 52,7 @@ protected
customer_id=$1 AND
start > DATE_TRUNC('month', LOCALTIMESTAMP)
SQL
- promise.then { |rows| -(rows.first&.dig("a") || 0) }
+ promise.then { |rows| rows.first&.dig("a") || 0 }
end
def find_rate(plan_name, other_tel, direction)
M test/test_web.rb => test/test_web.rb +3 -3
@@ 82,9 82,9 @@ class WebTest < Minitest::Test
db: FakeDB.new(
["test_usd", "+15557654321", :outbound] => [{ "rate" => 0.01 }],
["test_usd", "+15557654321", :inbound] => [{ "rate" => 0.01 }],
- ["customerid_limit"] => [{ "a" => -1000 }],
- ["customerid_low"] => [{ "a" => -1000 }],
- ["customerid_topup"] => [{ "a" => -1000 }]
+ ["customerid_limit"] => [{ "a" => 1000 }],
+ ["customerid_low"] => [{ "a" => 1000 }],
+ ["customerid_topup"] => [{ "a" => 1000 }]
)
)
Web.opts[:common_logger] = FakeLog.new