summaryrefslogtreecommitdiffstats
path: root/modules/test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/test')
-rw-r--r--modules/test/context_tests.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/test/context_tests.go b/modules/test/context_tests.go
index 1bc1d104bc..e6c78bcaa5 100644
--- a/modules/test/context_tests.go
+++ b/modules/test/context_tests.go
@@ -29,8 +29,8 @@ import (
// MockContext mock context for unit tests
func MockContext(t *testing.T, path string) *context.Context {
- var resp = &mockResponseWriter{}
- var ctx = context.Context{
+ resp := &mockResponseWriter{}
+ ctx := context.Context{
Render: &mockRender{},
Data: make(map[string]interface{}),
Flash: &middleware.Flash{
@@ -42,7 +42,7 @@ func MockContext(t *testing.T, path string) *context.Context {
requestURL, err := url.Parse(path)
assert.NoError(t, err)
- var req = &http.Request{
+ req := &http.Request{
URL: requestURL,
Form: url.Values{},
}
@@ -133,8 +133,7 @@ func (rw *mockResponseWriter) Push(target string, opts *http.PushOptions) error
return nil
}
-type mockRender struct {
-}
+type mockRender struct{}
func (tr *mockRender) TemplateLookup(tmpl string) *template.Template {
return nil