alert_notification_test.go 751 B

123456789101112131415161718192021222324252627282930313233343536
  1. package sqlstore
  2. import (
  3. "fmt"
  4. "testing"
  5. m "github.com/grafana/grafana/pkg/models"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestAlertNotificationSQLAccess(t *testing.T) {
  9. Convey("Testing Alert notification sql access", t, func() {
  10. InitTestDB(t)
  11. Convey("Alert notifications should be empty", func() {
  12. cmd := &m.GetAlertNotificationQuery{
  13. OrgID: FakeOrgId,
  14. Name: "email",
  15. }
  16. err := GetAlertNotifications(cmd)
  17. fmt.Printf("errror %v", err)
  18. So(err, ShouldBeNil)
  19. So(len(cmd.Result), ShouldEqual, 0)
  20. })
  21. /*
  22. Convey("Can save Alert Notification", func() {
  23. cmd := &m.CreateAlertNotificationCommand{}
  24. var err error
  25. err = CreateAlertNotification(cmd)
  26. So(err, ShouldBeNil)
  27. }) */
  28. })
  29. }