-
Notifications
You must be signed in to change notification settings - Fork 28
/
notification_test.go
33 lines (29 loc) · 1 KB
/
notification_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
** Mack: Notification Test
** Test desktop notifications
*/
package mack
import (
"testing"
)
func TestBuildNotification(t *testing.T) {
stringAssertTests := []StringAssert{
StringAssert{
actual: buildNotification("My Content", []string{"My title", "My subtitle", "Basso"}),
expected: "display notification \"My Content\" with title \"My title\" subtitle \"My subtitle\" sound name \"Basso\"",
},
StringAssert{
actual: buildNotification("My Content", []string{}),
expected: "display notification \"My Content\"",
},
StringAssert{
actual: buildNotification("My Content", []string{"", "", "Ping"}),
expected: "display notification \"My Content\" sound name \"Ping\"",
},
StringAssert{
actual: buildNotification("My Content", []string{"My title", "", "Submarine"}),
expected: "display notification \"My Content\" with title \"My title\" sound name \"Submarine\"",
},
}
runStringAssertTests("buildNotification", stringAssertTests, t)
}