Skip to content

Commit

Permalink
Update it_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkongo committed Feb 5, 2021
1 parent 65d5ef4 commit 049cb41
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions translations/it/it_test.go
@@ -1,6 +1,7 @@
package it
package it_test

import (
"go-playground/validator/translations/it"
"testing"
"time"

Expand All @@ -11,14 +12,14 @@ import (
)

func TestTranslations(t *testing.T) {
t.Parallel()

ita := italian.New()
uni := ut.New(ita, ita)
trans, _ := uni.GetTranslator("it")

validate := validator.New()

err := RegisterDefaultTranslations(validate, trans)
err := it.RegisterDefaultTranslations(validate, trans)
Equal(t, err, nil)

type Inner struct {
Expand Down Expand Up @@ -659,7 +660,6 @@ func TestTranslations(t *testing.T) {
}

for _, tt := range tests {

var fe validator.FieldError

for _, e := range errs {
Expand All @@ -672,5 +672,4 @@ func TestTranslations(t *testing.T) {
NotEqual(t, fe, nil)
Equal(t, tt.expected, fe.Translate(trans))
}

}

0 comments on commit 049cb41

Please sign in to comment.