WIP Generic IsValid for *Id structs

This commit is contained in:
erik 2023-12-22 13:44:45 +01:00 committed by Michael Jerger
parent e69e5df089
commit 2e031a9763
3 changed files with 27 additions and 6 deletions

View file

@ -99,7 +99,7 @@ func TestPersonIdValidation(t *testing.T) {
sut.Host = "an.other.host"
sut.Port = ""
sut.UnvalidatedInput = "https://an.other.host/path/1"
if _, err := sut.IsValid(); err.Error() != "path: \"path\" has to be an api path" {
if _, err := IsValid(sut); err.Error() != "path: \"path\" has to be a person specific api path" {
t.Errorf("validation error expected but was: %v\n", err)
}
}