mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
Started removing timing
This commit is contained in:
committed by
Dan Christian Bogos
parent
53474406e3
commit
7671c0cb5e
@@ -25,13 +25,12 @@ import (
|
||||
|
||||
func TestMissingStructFieldsCorrect(t *testing.T) {
|
||||
var attr = struct {
|
||||
Tenant string
|
||||
Account string
|
||||
Type string
|
||||
ActionTimingsID string
|
||||
}{"bevoip.eu", "danconns0001", MetaPrepaid, "mama"}
|
||||
Tenant string
|
||||
Account string
|
||||
Type string
|
||||
}{"bevoip.eu", "danconns0001", MetaPrepaid}
|
||||
if missing := MissingStructFields(&attr,
|
||||
[]string{"Tenant", "Account", "Type", "ActionTimingsID"}); len(missing) != 0 {
|
||||
[]string{"Tenant", "Account", "Type"}); len(missing) != 0 {
|
||||
t.Error("Found missing field on correct struct", missing)
|
||||
}
|
||||
}
|
||||
@@ -80,13 +79,12 @@ func TestUpdateStructWithIfaceMap(t *testing.T) {
|
||||
|
||||
func TestMissingStructFieldsAppend(t *testing.T) {
|
||||
var attr = struct {
|
||||
Tenant string
|
||||
Account string
|
||||
Type string
|
||||
ActionTimingsID string
|
||||
}{"", "", MetaPrepaid, ""}
|
||||
Tenant string
|
||||
Account string
|
||||
Type string
|
||||
}{"", "", MetaPrepaid}
|
||||
missing := MissingStructFields(&attr,
|
||||
[]string{"Tenant", "Account", "Type", "ActionTimingsID"})
|
||||
[]string{"Tenant", "Account", "Type"})
|
||||
if len(missing) == 0 {
|
||||
t.Error("Required missing field not found")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user