base_test.go 793 B

123456789101112131415161718192021222324252627282930
  1. package notifiers
  2. // import . "github.com/smartystreets/goconvey/convey"
  3. //
  4. // func TestBaseNotifier( t *testing.T ) {
  5. // Convey("Parsing base notification state", t, func() {
  6. //
  7. // Convey("matches", func() {
  8. // json := `
  9. // {
  10. // "states": "critical"
  11. // }`
  12. //
  13. // settingsJSON, _ := simplejson.NewJson([]byte(json))
  14. // not := NewNotifierBase("ops", "email", settingsJSON)
  15. // So(not.MatchSeverity(m.AlertSeverityCritical), ShouldBeTrue)
  16. // })
  17. //
  18. // Convey("does not match", func() {
  19. // json := `
  20. // {
  21. // "severityFilter": "critical"
  22. // }`
  23. //
  24. // settingsJSON, _ := simplejson.NewJson([]byte(json))
  25. // not := NewNotifierBase("ops", "email", settingsJSON)
  26. // So(not.MatchSeverity(m.AlertSeverityWarning), ShouldBeFalse)
  27. // })
  28. // })
  29. // }