1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-13 23:35:43 +02:00

fixed json, xml pretty print

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-12-09 11:13:55 -08:00
parent 133f7acf21
commit 20954afd66
3 changed files with 31 additions and 1 deletions

View File

@@ -29,6 +29,16 @@ const (
invalidContent = "invalid content"
)
const userJSONPretty = `{
"id": 1,
"name": "Jon Snow"
}`
const userXMLPretty = `<user>
<id>1</id>
<name>Jon Snow</name>
</user>`
func TestEcho(t *testing.T) {
e := New()
req, _ := http.NewRequest(GET, "/", nil)