1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-03 22:59:09 +02:00

New API Echo.Server

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Merten van Gerven
2015-06-27 23:34:22 +02:00
committed by Vishal Rana
parent b85f9dd147
commit 07c0cf21f0
3 changed files with 20 additions and 8 deletions

View File

@@ -375,6 +375,12 @@ func TestEchoHTTPError(t *testing.T) {
assert.Equal(t, m, he.Error())
}
func TestEchoServer(t *testing.T) {
e := New()
s := e.Server(":1323")
assert.IsType(t, &http.Server{}, s)
}
func testMethod(t *testing.T, method, path string, e *Echo) {
m := fmt.Sprintf("%c%s", method[0], strings.ToLower(method[1:]))
p := reflect.ValueOf(path)