Commit 124fb743 by Hugo Häggmark Committed by Leonard Gram

teams: make test cases pass again

parent da3dcd19
......@@ -972,8 +972,12 @@ func postDashboardScenario(desc string, url string, routePattern string, mock *d
Convey(desc+" "+url, func() {
defer bus.ClearBusHandlers()
cfg := setting.NewCfg()
cfg.EditorsCanOwn = false
hs := HTTPServer{
Bus: bus.GetBus(),
Cfg: cfg,
}
sc := setupScenarioContext(url)
......
......@@ -9,6 +9,7 @@ import (
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/setting"
. "github.com/smartystreets/goconvey/convey"
)
......@@ -141,12 +142,20 @@ func createFolderScenario(desc string, url string, routePattern string, mock *fa
Convey(desc+" "+url, func() {
defer bus.ClearBusHandlers()
cfg := setting.NewCfg()
cfg.EditorsCanOwn = false
hs := HTTPServer{
Bus: bus.GetBus(),
Cfg: cfg,
}
sc := setupScenarioContext(url)
sc.defaultHandler = Wrap(func(c *m.ReqContext) Response {
sc.context = c
sc.context.SignedInUser = &m.SignedInUser{OrgId: TestOrgID, UserId: TestUserID}
return CreateFolder(c, cmd)
return hs.CreateFolder(c, cmd)
})
origNewFolderService := dashboards.NewFolderService
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment