mirror of
https://github.com/rjNemo/go-microservices-tuto
synced 2026-06-06 02:16:46 +00:00
17 lines
206 B
Go
17 lines
206 B
Go
package models
|
|
|
|
import "testing"
|
|
|
|
func TestValidation(t *testing.T) {
|
|
p := &Product{
|
|
Name: "Frappe",
|
|
Price: 1.1,
|
|
SKU: "a-adfg-fdds",
|
|
}
|
|
|
|
err := p.Validate()
|
|
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
}
|