Skip to content

Commit

Permalink
add empty suffix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaleta committed Feb 19, 2021
1 parent e6df4ab commit f0d121a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ func Test_PagerIllegalTeamToken(t *testing.T) {
assert.Equal(t, "token_value", teamToken)
}

func Test_PagerTeamNoSuffix(t *testing.T) {
config.teamName = "test-team"
config.teamSuffix = ""
os.Setenv("test_team", "token_value")
teamToken, err := getTeamToken()
assert.Nil(t, err)
assert.NotNil(t, teamToken)
assert.Equal(t, "token_value", teamToken)
}

func Test_GetSummary(t *testing.T) {
event := corev2.FixtureEvent("foo", "bar")
config.summaryTemplate = "{{.Entity.Name}}-{{.Check.Name}}"
Expand Down

0 comments on commit f0d121a

Please sign in to comment.