Fixed tests up to master branch

This commit is contained in:
Sasha Myasoedov 2014-07-18 17:42:38 +03:00
parent 7713e8157a
commit 8933874582
1 changed files with 7 additions and 2 deletions

View File

@ -230,7 +230,11 @@ func TestContextSetGet(t *testing.T) {
// Set // Set
c.Set("foo", "bar") 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) t.Errorf("Value should be bar, was %s", v)
} }
}) })
@ -267,7 +271,8 @@ func TestContextHTML(t *testing.T) {
w := httptest.NewRecorder() w := httptest.NewRecorder()
r := Default() 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 } type TestData struct{ Name string }