refactor: разнести пакеты и обновить валидацию
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package mila
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestValidateAcceptsValidUTF8State(t *testing.T) {
|
||||
err := Validate(DefaultConfig(), ContentState{
|
||||
@@ -22,8 +25,8 @@ func TestValidateRejectsTooLongRoute(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("expected validation error")
|
||||
}
|
||||
if !IsValidationError(err) {
|
||||
t.Fatalf("expected ValidationError, got %T", err)
|
||||
if !errors.Is(err, ErrInvalidData) {
|
||||
t.Fatalf("expected ErrInvalidData, got %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user