enhance test & fix reviews

This commit is contained in:
Michael Jerger 2024-05-14 08:24:31 +02:00
parent 33648f2a4c
commit fc38e56373
12 changed files with 101 additions and 20 deletions

View file

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