Selaa lähdekoodia

dashboard: fix test for folderIds

Daniel Lee 8 vuotta sitten
vanhempi
commit
3dc2e06a33
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      pkg/services/sqlstore/dashboard_test.go

+ 2 - 1
pkg/services/sqlstore/dashboard_test.go

@@ -381,10 +381,11 @@ func TestDashboardDataAccess(t *testing.T) {
 			childDash2 := insertTestDashboard("child dash 2", 1, folder2.Id, false, "prod")
 
 			currentUser := createUser("viewer", "Viewer", false)
+			var rootFolderId int64 = 0
 
 			Convey("and one folder is expanded, the other collapsed", func() {
 				Convey("should return dashboards in root and expanded folder", func() {
-					query := &search.FindPersistedDashboardsQuery{FolderIds: []int64{folder1.Id}, SignedInUser: &m.SignedInUser{UserId: currentUser.Id, OrgId: 1}, OrgId: 1}
+					query := &search.FindPersistedDashboardsQuery{FolderIds: []int64{rootFolderId, folder1.Id}, SignedInUser: &m.SignedInUser{UserId: currentUser.Id, OrgId: 1}, OrgId: 1}
 					err := SearchDashboards(query)
 					So(err, ShouldBeNil)
 					So(len(query.Result), ShouldEqual, 4)