forked from kevadesu/forgejo
WIP Generic IsValid for *Id structs
This commit is contained in:
parent
e69e5df089
commit
2e031a9763
3 changed files with 27 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue