Refactor models to use single struct per entity
This commit is contained in:
@@ -34,6 +34,10 @@ func RequestPost[TResult any](t *testing.T, baseURL string, urlSuffix string, bo
|
||||
return RequestAny[TResult](t, "", "POST", baseURL, urlSuffix, body, true)
|
||||
}
|
||||
|
||||
func RequestAuthPostRaw(t *testing.T, akey string, baseURL string, urlSuffix string, body any) string {
|
||||
return RequestAny[string](t, akey, "POST", baseURL, urlSuffix, body, false)
|
||||
}
|
||||
|
||||
func RequestAuthPost[TResult any](t *testing.T, akey string, baseURL string, urlSuffix string, body any) TResult {
|
||||
return RequestAny[TResult](t, akey, "POST", baseURL, urlSuffix, body, true)
|
||||
}
|
||||
|
||||
@@ -135,13 +135,13 @@ func assertjsonStructureMatchMapObject(t *testing.T, mapschema map[string]any, r
|
||||
|
||||
for k := range mapschema {
|
||||
if _, ok := realValue[k]; !ok {
|
||||
t.Errorf("Missing Key: < %s >", keyPath)
|
||||
t.Errorf("Missing Key: < %s >", keyPath+"."+k)
|
||||
}
|
||||
}
|
||||
|
||||
for k := range realValue {
|
||||
if _, ok := mapschema[k]; !ok {
|
||||
t.Errorf("Additional key: < %s >", keyPath)
|
||||
t.Errorf("Additional key: < %s >", keyPath+"."+k)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user