mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 16:18:44 +05:00
Updated tests in account
This commit is contained in:
committed by
Dan Christian Bogos
parent
af5cf967b4
commit
1db6f91ad5
@@ -2329,13 +2329,13 @@ func TestAccountAsNavigableMap(t *testing.T) {
|
||||
|
||||
func TestAccountClone(t *testing.T) {
|
||||
//empty check
|
||||
// account := &Account{}
|
||||
// eOut := &Account{}
|
||||
// if rcv := account.Clone(); reflect.DeepEqual(eOut, rcv) {
|
||||
// t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
|
||||
// }
|
||||
account := &Account{}
|
||||
eOut := &Account{}
|
||||
if rcv := account.Clone(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
|
||||
}
|
||||
//normal check
|
||||
account := &Account{
|
||||
account = &Account{
|
||||
ID: "testID",
|
||||
BalanceMap: map[string]Balances{
|
||||
utils.MONETARY: {&Balance{Value: 10, Weight: 10}}},
|
||||
@@ -2351,7 +2351,7 @@ func TestAccountClone(t *testing.T) {
|
||||
Disabled: true,
|
||||
executingTriggers: true,
|
||||
}
|
||||
eOut := &Account{
|
||||
eOut = &Account{
|
||||
ID: "testID",
|
||||
BalanceMap: map[string]Balances{
|
||||
utils.MONETARY: {&Balance{Value: 10, Weight: 10}}},
|
||||
@@ -2368,7 +2368,7 @@ func TestAccountClone(t *testing.T) {
|
||||
executingTriggers: true,
|
||||
}
|
||||
|
||||
if rcv := account.Clone(); reflect.DeepEqual(eOut, rcv) {
|
||||
if rcv := account.Clone(); !reflect.DeepEqual(eOut, rcv) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv))
|
||||
}
|
||||
|
||||
|
||||
@@ -782,7 +782,7 @@ func TestLoadSharedGroups(t *testing.T) {
|
||||
},
|
||||
}
|
||||
if !reflect.DeepEqual(sg1, expected) {
|
||||
t.Error("Error loading shared group: ", sg1.AccountParameters["SG1"])
|
||||
t.Errorf("Expected: %s, received %s ", utils.ToJSON(expected), utils.ToJSON(sg1))
|
||||
}
|
||||
sg2 := csvr.sharedGroups["SG2"]
|
||||
expected = &SharedGroup{
|
||||
|
||||
Reference in New Issue
Block a user