Chore: Add context to star and stats (#39591)
* Add context to star and stats * Use WithTransactionalDbSession * Add additional ctx * Remove convey * Fix star handler name * Use WithDbSession, use DispatchCtx * Remove xorm from star
This commit is contained in:
@@ -386,13 +386,13 @@ func TestDashboardDataAccess(t *testing.T) {
|
||||
|
||||
Convey("Given two dashboards, one is starred dashboard by user 10, other starred by user 1", func() {
|
||||
starredDash := insertTestDashboard(t, sqlStore, "starred dash", 1, 0, false)
|
||||
err := StarDashboard(&models.StarDashboardCommand{
|
||||
err := sqlStore.StarDashboard(context.Background(), &models.StarDashboardCommand{
|
||||
DashboardId: starredDash.Id,
|
||||
UserId: 10,
|
||||
})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
err = StarDashboard(&models.StarDashboardCommand{
|
||||
err = sqlStore.StarDashboard(context.Background(), &models.StarDashboardCommand{
|
||||
DashboardId: savedDash.Id,
|
||||
UserId: 1,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user