Fix testcase

This commit is contained in:
Kota Kanbe
2017-05-04 16:27:00 +09:00
committed by kota kanbe
parent c103b79ec2
commit 17a4e532c1
5 changed files with 76 additions and 135 deletions

View File

@@ -1,23 +1,21 @@
package report
import "testing"
// func TestGetNotifyUsers(t *testing.T) {
// var tests = []struct {
// in []string
// expected string
// }{
// {
// []string{"@user1", "@user2"},
// "<@user1> <@user2>",
// },
// }
func TestGetNotifyUsers(t *testing.T) {
var tests = []struct {
in []string
expected string
}{
{
[]string{"@user1", "@user2"},
"<@user1> <@user2>",
},
}
// for _, tt := range tests {
// actual := getNotifyUsers(tt.in)
// if tt.expected != actual {
// t.Errorf("expected %s, actual %s", tt.expected, actual)
// }
// }
for _, tt := range tests {
actual := getNotifyUsers(tt.in)
if tt.expected != actual {
t.Errorf("expected %s, actual %s", tt.expected, actual)
}
}
}
// }