removes uniqnes check on slug when saving dashboards

This commit is contained in:
bergquist
2018-01-30 18:57:33 +01:00
committed by Leonard Gram
parent 6d2a555866
commit bb3183f6cd
7 changed files with 33 additions and 14 deletions

View File

@@ -207,6 +207,22 @@ func TestDashboardDataAccess(t *testing.T) {
}
err := SaveDashboard(&cmd)
So(err, ShouldBeNil)
})
Convey("Should not be able to save dashboard with same uid", func() {
cmd := m.SaveDashboardCommand{
OrgId: 1,
Dashboard: simplejson.NewFromAny(map[string]interface{}{
"id": nil,
"title": "test dash 23",
"uid": "dsfalkjngailuedt",
}),
}
err := SaveDashboard(&cmd)
So(err, ShouldBeNil)
err = SaveDashboard(&cmd)
So(err, ShouldNotBeNil)
})