mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
Fixed CompressFactor check for comparing
This commit is contained in:
committed by
Dan Christian Bogos
parent
c003c8eab4
commit
95d4a6cd96
@@ -459,7 +459,7 @@ func (rIl *RateSInterval) Equals(nRil *RateSInterval) (eq bool) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
return rIl.CompressFactor == nRil.CompressFactor
|
||||
}
|
||||
|
||||
// Equals returns the equality between two RateSIncrement
|
||||
|
||||
@@ -1696,19 +1696,6 @@ func TestRatesIncrementEquals(t *testing.T) {
|
||||
}
|
||||
incr2.IntervalRateIndex = 1
|
||||
|
||||
//not equals by RateUID
|
||||
incr1.Rate.uID = "changed_uID"
|
||||
if incr1.Equals(incr2) {
|
||||
t.Errorf("Intervals %+v and %+v are equal", ToJSON(incr1), ToJSON(incr2))
|
||||
}
|
||||
incr1.Rate.uID = "newID"
|
||||
|
||||
incr2.Rate.uID = "changed_uID"
|
||||
if incr1.Equals(incr2) {
|
||||
t.Errorf("Intervals %+v and %+v are equal", ToJSON(incr1), ToJSON(incr2))
|
||||
}
|
||||
incr2.Rate.uID = "newID"
|
||||
|
||||
// not equals by CompressFactor
|
||||
incr1.CompressFactor = 0
|
||||
if incr1.Equals(incr2) {
|
||||
|
||||
Reference in New Issue
Block a user