loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,200)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,200)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
CallPostDashboard(sc)
So(sc.resp.Code,ShouldEqual,200)
})
})
Convey("When user is an Org Viewer but has an admin permission",func(){