mirror of
https://github.com/grafana/grafana.git
synced 2025-09-27 09:23:47 +08:00
Chore: replace macaron with web package (#40136)
* replace macaron with web package * add web.go
This commit is contained in:
@ -4,8 +4,8 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/macaron.v1"
|
||||
)
|
||||
|
||||
func TestQueryBoolWithDefault(t *testing.T) {
|
||||
@ -31,7 +31,7 @@ func TestQueryBoolWithDefault(t *testing.T) {
|
||||
req, err := http.NewRequest("GET", tt.url, nil)
|
||||
require.NoError(t, err)
|
||||
r := ReqContext{
|
||||
Context: &macaron.Context{Req: req},
|
||||
Context: &web.Context{Req: req},
|
||||
}
|
||||
require.Equal(t, tt.expected, r.QueryBoolWithDefault("silenced", tt.defaultValue))
|
||||
})
|
||||
|
Reference in New Issue
Block a user