File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -93,3 +93,24 @@ func TestEvents(t *testing.T) {
9393 }
9494
9595}
96+
97+ func TestFindTrollHouses (t * testing.T ) {
98+ botnilson := BotMockup {}
99+ trollGroups = []string {"@rolisvaldo" }
100+ if got := findTrollHouses (& botnilson , 1 ); got != "@rolisvaldo" {
101+ t .Errorf ("findTrollHouses expects @rolisvaldo, got: %v" , got )
102+ }
103+ if got := findTrollHouses (& botnilson , 2 ); got != "@rolisvaldo" {
104+ t .Errorf ("findTrollHouses expects @rolisvaldo, got: %v" , got )
105+ }
106+ if got := findTrollHouses (& botnilson , 3 ); got != "@rolisvaldo" {
107+ t .Errorf ("findTrollHouses expects @rolisvaldo, got: %v" , got )
108+ }
109+ if got := findTrollHouses (& botnilson , 4 ); got != "" {
110+ t .Errorf ("findTrollHouses expects empty string, got: %v" , got )
111+ }
112+ if got := findTrollHouses (& botnilson , - 1 ); got != "" {
113+ t .Errorf ("findTrollHouses expects empty string, got: %v" , got )
114+ }
115+ }
116+
You can’t perform that action at this time.
0 commit comments