fix issue in unit testing case for package gview

This commit is contained in:
John Guo
2021-10-22 13:14:48 +08:00
parent 977780736f
commit 4e7b33bde3

View File

@ -8,6 +8,7 @@ package gview_test
import (
"context"
"fmt"
"github.com/gogf/gf/v2/encoding/ghtml"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
@ -411,7 +412,7 @@ func Test_BuildInFuncDump(t *testing.T) {
})
r, err := v.ParseContent(context.TODO(), "{{dump .}}")
t.Assert(err, nil)
t.Assert(gstr.Contains(r, `"name": "john"`), true)
t.Assert(gstr.Contains(r, `"name": "john"`), true)
t.Assert(gstr.Contains(r, `"score": 100`), true)
})
}