more validations and tests

This commit is contained in:
Radu Ioan Fericean
2015-05-21 16:38:22 +03:00
parent bb6a7ea6c3
commit 364f74c6c8
2 changed files with 5 additions and 0 deletions

View File

@@ -160,6 +160,9 @@ func (rp *RatingPlan) areRatesSane() bool {
if math.Mod(nextRate.GroupIntervalStart.Seconds(), rate.RateIncrement.Seconds()) != 0 {
return false
}
if rate.RateUnit == 0 || rate.RateIncrement == 0 {
return false
}
}
}
}