test(alerting): fix broken unit tests

This commit is contained in:
bergquist 2016-05-16 16:20:28 +02:00
parent 77b7cdfadb
commit 8dbb5bad4b
4 changed files with 8 additions and 8 deletions

View File

@ -346,7 +346,7 @@ func TestAlertModel(t *testing.T) {
},
}
alerts := *cmd.GetAlertModels()
alerts := cmd.GetAlertModels()
Convey("all properties have been set", func() {
So(alerts, ShouldNotBeEmpty)

View File

@ -40,7 +40,7 @@ func TestAlertRuleChangesDataAccess(t *testing.T) {
}
cmd := m.SaveAlertsCommand{
Alerts: &items,
Alerts: items,
DashboardId: testDash.Id,
OrgId: FakeOrgId,
UserId: 2,

View File

@ -34,7 +34,7 @@ func TestAlertingDataAccess(t *testing.T) {
}
cmd := m.SaveAlertsCommand{
Alerts: &items,
Alerts: items,
DashboardId: testDash.Id,
OrgId: 1,
UserId: 1,
@ -80,7 +80,7 @@ func TestAlertingDataAccess(t *testing.T) {
DashboardId: testDash.Id,
OrgId: 1,
UserId: 1,
Alerts: &modifiedItems,
Alerts: modifiedItems,
}
err := SaveAlerts(&modifiedCmd)
@ -135,7 +135,7 @@ func TestAlertingDataAccess(t *testing.T) {
},
}
cmd.Alerts = &multipleItems
cmd.Alerts = multipleItems
err = SaveAlerts(&cmd)
Convey("Should save 3 dashboards", func() {
@ -156,7 +156,7 @@ func TestAlertingDataAccess(t *testing.T) {
Convey("should updated two dashboards and delete one", func() {
missingOneAlert := multipleItems[:2]
cmd.Alerts = &missingOneAlert
cmd.Alerts = missingOneAlert
err = SaveAlerts(&cmd)
Convey("should delete the missing alert", func() {
@ -195,7 +195,7 @@ func TestAlertingDataAccess(t *testing.T) {
}
cmd := m.SaveAlertsCommand{
Alerts: &items,
Alerts: items,
DashboardId: testDash.Id,
OrgId: 1,
UserId: 1,

View File

@ -33,7 +33,7 @@ func TestAlertingStateAccess(t *testing.T) {
}
cmd := m.SaveAlertsCommand{
Alerts: &items,
Alerts: items,
DashboardId: testDash.Id,
OrgId: 1,
UserId: 1,