mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
add_balance
This commit is contained in:
@@ -47,9 +47,17 @@ func TestToJSONEmpty(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFromJSON(t *testing.T) {
|
||||
line := FromJSON([]byte(`{"TimeStart":"Test","Crazy":1,"Mama":true,"Test":1}`))
|
||||
line := FromJSON([]byte(`{"TimeStart":"Test","Crazy":1,"Mama":true,"Test":1}`), []string{"TimeStart", "Test", "Crazy", "Mama", "Test"})
|
||||
expected := `TimeStart="Test" Crazy=1 Mama=true Test=1`
|
||||
if line != expected {
|
||||
t.Errorf("Expected: %s got: '%s'", expected, line)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFromJSONInterestingFields(t *testing.T) {
|
||||
line := FromJSON([]byte(`{"TimeStart":"Test","Crazy":1,"Mama":true,"Test":1}`), []string{"TimeStart", "Test"})
|
||||
expected := `TimeStart="Test" Test=1`
|
||||
if line != expected {
|
||||
t.Errorf("Expected: %s got: '%s'", expected, line)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user