github.com/seeker-insurance/kit@v0.0.13/brewerydb/endpoints/request/location_test.go (about) 1 package request 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestLocation_Valid(t *testing.T) { 10 var loc Location 11 assert.Error(t, loc.Valid()) 12 loc.Region = "CA" 13 assert.NoError(t, loc.Valid()) 14 loc.Page = -1 15 assert.Error(t, loc.Valid()) 16 }