|
|
@@ -42,6 +42,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
|
|
|
return nil
|
|
|
})
|
|
|
|
|
|
+ bus.AddHandler("test", func(query *m.GetProvisionedDashboardByDashboardId) error {
|
|
|
+ query.Result = nil
|
|
|
+ return nil
|
|
|
+ })
|
|
|
+
|
|
|
viewerRole := m.ROLE_VIEWER
|
|
|
editorRole := m.ROLE_EDITOR
|
|
|
|
|
|
@@ -192,6 +197,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
|
|
|
fakeDash.HasAcl = true
|
|
|
setting.ViewersCanEdit = false
|
|
|
|
|
|
+ bus.AddHandler("test", func(query *m.GetProvisionedDashboardByDashboardId) error {
|
|
|
+ query.Result = nil
|
|
|
+ return nil
|
|
|
+ })
|
|
|
+
|
|
|
bus.AddHandler("test", func(query *m.GetDashboardsBySlugQuery) error {
|
|
|
dashboards := []*m.Dashboard{fakeDash}
|
|
|
query.Result = dashboards
|
|
|
@@ -625,6 +635,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
|
|
|
dashTwo.FolderId = 3
|
|
|
dashTwo.HasAcl = false
|
|
|
|
|
|
+ bus.AddHandler("test", func(query *m.GetProvisionedDashboardByDashboardId) error {
|
|
|
+ query.Result = nil
|
|
|
+ return nil
|
|
|
+ })
|
|
|
+
|
|
|
bus.AddHandler("test", func(query *m.GetDashboardsBySlugQuery) error {
|
|
|
dashboards := []*m.Dashboard{dashOne, dashTwo}
|
|
|
query.Result = dashboards
|
|
|
@@ -751,6 +766,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
|
|
|
return nil
|
|
|
})
|
|
|
|
|
|
+ bus.AddHandler("test", func(query *m.GetProvisionedDashboardByDashboardId) error {
|
|
|
+ query.Result = nil
|
|
|
+ return nil
|
|
|
+ })
|
|
|
+
|
|
|
bus.AddHandler("test", func(query *m.GetDashboardVersionQuery) error {
|
|
|
query.Result = &m.DashboardVersion{
|
|
|
Data: simplejson.NewFromAny(map[string]interface{}{
|