restoreDashboardVersionScenario("When calling POST on","/api/dashboards/id/1/restore","/api/dashboards/id/:dashboardId/restore",mock,cmd,func(sc*scenarioContext){
CallRestoreDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,200)
dto:=mock.SavedDashboards[0]
So(dto.Dashboard.FolderId,ShouldEqual,1)
So(dto.Dashboard.Title,ShouldEqual,"Child dash")
So(dto.Message,ShouldEqual,"Restored from version 1")
})
})
Convey("Given dashboard in general folder being restored should restore to general folder",t,func(){
restoreDashboardVersionScenario("When calling POST on","/api/dashboards/id/1/restore","/api/dashboards/id/:dashboardId/restore",mock,cmd,func(sc*scenarioContext){
CallRestoreDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,200)
dto:=mock.SavedDashboards[0]
So(dto.Dashboard.FolderId,ShouldEqual,0)
So(dto.Dashboard.Title,ShouldEqual,"Child dash")
So(dto.Message,ShouldEqual,"Restored from version 1")