adds tests that validate that updated is correct

This commit is contained in:
bergquist 2018-02-13 10:33:02 +01:00 committed by Leonard Gram
parent ead1c300d7
commit fc371af47f

View File

@ -2,6 +2,7 @@ package sqlstore
import (
"testing"
"time"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/models"
@ -23,11 +24,14 @@ func TestDashboardProvisioningTest(t *testing.T) {
}
Convey("Saving dashboards with extras", func() {
now := time.Now()
cmd := &models.SaveProvisionedDashboardCommand{
DashboardCmd: saveDashboardCmd,
DashboardProvisioning: &models.DashboardProvisioning{
Name: "default",
ExternalId: "/var/grafana.json",
Updated: now,
},
}
@ -44,6 +48,7 @@ func TestDashboardProvisioningTest(t *testing.T) {
So(len(query.Result), ShouldEqual, 1)
So(query.Result[0].DashboardId, ShouldEqual, dashId)
So(query.Result[0].Updated, ShouldEqual, now)
})
})
})