mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-30 14:01:02 +00:00
Introduced ErrNotValid
This commit is contained in:
parent
cb4690e570
commit
c4f9f8578a
8 changed files with 47 additions and 22 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue