Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlong committed Sep 3, 2020
1 parent fafaa2e commit 45c24e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions compiled.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions compiled_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package emails

import (
"fmt"
"github.com/statping/statping/types/core"
"github.com/statping/statping/types/failures"
"github.com/statping/statping/types/services"
Expand All @@ -24,12 +25,12 @@ func TestServiceOnline(t *testing.T) {
Core: *core.Example(),
Service: example,
Failure: failures.Example(),
Email: "[email protected]",
Email: "[email protected]",
}
tmpl, err := Parse(Success, replaced)
require.Nil(t, err)
assert.Contains(t, tmpl, example.Name)
assert.Contains(t, tmpl, example.Downtime().Human())
assert.Contains(t, tmpl, fmt.Sprintf("%0.0f seconds", example.Downtime().Seconds()))
}

func TestServiceOffline(t *testing.T) {
Expand All @@ -40,10 +41,10 @@ func TestServiceOffline(t *testing.T) {
Core: *core.Example(),
Service: example,
Failure: failure,
Email: "[email protected]",
Email: "[email protected]",
}
tmpl, err := Parse(Failure, replaced)
require.Nil(t, err)
assert.Contains(t, tmpl, example.Name)
assert.Contains(t, tmpl, example.Downtime().Human())
assert.Contains(t, tmpl, fmt.Sprintf("%0.0f seconds", example.Downtime().Seconds()))
}

0 comments on commit 45c24e2

Please sign in to comment.