1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-29 22:48:07 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-03-05 20:03:11 -08:00
parent 8916d5558c
commit a9c88cad63
16 changed files with 55 additions and 36 deletions

View File

@@ -23,7 +23,7 @@ type (
}
)
func (t *Template) Render(w io.Writer, name string, data interface{}) error {
func (t *Template) Render(w io.Writer, name string, data interface{}, c Context) error {
return t.templates.ExecuteTemplate(w, name, data)
}
@@ -46,6 +46,10 @@ func TestContext(t *testing.T) {
// Socket
assert.Nil(t, c.Socket())
// ParamNames
c.Object().pnames = []string{"uid", "fid"}
assert.EqualValues(t, []string{"uid", "fid"}, c.ParamNames())
// Param by id
c.Object().pnames = []string{"id"}
c.Object().pvalues = []string{"1"}