mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
make sure countUnits is not called during dryrun
This commit is contained in:
committed by
Dan Christian Bogos
parent
279e0daabd
commit
5f5330382f
@@ -851,9 +851,9 @@ func (acc *Account) DebitConnectionFee(cc *CallCost, ufMoneyBalances Balances, c
|
||||
}
|
||||
if b.GetValue() >= connectFee {
|
||||
b.SubtractValue(connectFee)
|
||||
acc.countUnits(1, utils.MetaEventConnect, cc, b, fltrS)
|
||||
// the conect fee is not refundable!
|
||||
if count {
|
||||
acc.countUnits(1, utils.MetaEventConnect, cc, b, fltrS)
|
||||
acc.countUnits(connectFee, utils.MetaMonetary, cc, b, fltrS)
|
||||
}
|
||||
connectFeePaid = true
|
||||
|
||||
@@ -107,8 +107,8 @@ RT1,0.2,1,1s,1s,0`,
|
||||
t.Errorf("expected to get usage even though account got disabled")
|
||||
}
|
||||
|
||||
if !accRepl.Disabled {
|
||||
t.Errorf("expected account to be disabled")
|
||||
if accRepl.Disabled {
|
||||
t.Errorf("expected account to be not be disabled")
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user