mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
Fixed unit tests for rateProfile package and fields
This commit is contained in:
committed by
Dan Christian Bogos
parent
86bea089d8
commit
93df974ba7
@@ -1119,10 +1119,8 @@ func TestUsageMinute(t *testing.T) {
|
||||
Opts: map[string]interface{}{},
|
||||
},
|
||||
}
|
||||
if result, err := testCostEventStruct.Usage(); err != nil {
|
||||
t.Errorf("Expected <nil> , received <%+v>", err)
|
||||
} else if !reflect.DeepEqual(result, time.Minute) {
|
||||
t.Errorf("Expected <%+v> , received <%+v>", time.Minute, result)
|
||||
if _, err := testCostEventStruct.Usage(); err == nil || err != ErrNotFound {
|
||||
t.Errorf("Expected %+v, received %+v", ErrNotFound, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,9 +1152,9 @@ func TestUsage(t *testing.T) {
|
||||
}
|
||||
|
||||
if result, err := testCostEventStruct.Usage(); err != nil {
|
||||
t.Errorf("Expected <nil> , received <%+v>", err)
|
||||
} else if !reflect.DeepEqual(result.String(), "2m10s") {
|
||||
t.Errorf("Expected <2m10s> , received <%+v>", result.String())
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(result.String(), "130000000000") {
|
||||
t.Errorf("Expected <130000000000> , received <%+v>", result.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user