From 893387458242d5c76707d5e0d8ffdb8504d04839 Mon Sep 17 00:00:00 2001 From: Sasha Myasoedov Date: Fri, 18 Jul 2014 17:42:38 +0300 Subject: [PATCH] Fixed tests up to master branch --- gin_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gin_test.go b/gin_test.go index c853b0f..5bf737c 100644 --- a/gin_test.go +++ b/gin_test.go @@ -230,7 +230,11 @@ func TestContextSetGet(t *testing.T) { // Set c.Set("foo", "bar") - if v := c.Get("foo"); v != "bar" { + v, err := c.Get("foo") + if err != nil { + t.Errorf("Error on exist key") + } + if v != "bar" { t.Errorf("Value should be bar, was %s", v) } }) @@ -267,7 +271,8 @@ func TestContextHTML(t *testing.T) { w := httptest.NewRecorder() r := Default() - r.HTMLTemplates = template.Must(template.New("t").Parse(`Hello {{.Name}}`)) + templ, _ := template.New("t").Parse(`Hello {{.Name}}`) + r.SetHTMLTemplate(templ) type TestData struct{ Name string }