Added a basic homepage
This commit is contained in:
parent
d40640a648
commit
12fd3c04ca
113 changed files with 414 additions and 506 deletions
19
internal/services/validator_test.go
Normal file
19
internal/services/validator_test.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package services
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestValidator(t *testing.T) {
|
||||
type example struct {
|
||||
Value string `validate:"required"`
|
||||
}
|
||||
e := example{}
|
||||
err := c.Validator.Validate(e)
|
||||
assert.Error(t, err)
|
||||
e.Value = "a"
|
||||
err = c.Validator.Validate(e)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue