1
0
mirror of https://github.com/ggicci/httpin.git synced 2024-11-28 08:49:05 +02:00
httpin/options_test.go

18 lines
362 B
Go

package httpin
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestOptions(t *testing.T) {
Convey("Apply error status code", t, func() {
engine, _ := New(ProductQuery{})
So(engine.errorStatusCode, ShouldEqual, 422)
engine, _ = New(ProductQuery{}, WithErrorStatusCode(400))
So(engine.errorStatusCode, ShouldEqual, 400)
})
}