about summary refs log tree commit diff
path: root/fun/clbot/clbot_test.go
blob: 567540c364f728f35ea4bfe815fa9eb278aa0017 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main

import (
	"testing"
)

func TestChangeShouldBeSkipped(t *testing.T) {
	dontSkipAny := ""
	if changeShouldBeSkipped(dontSkipAny, "mysubject") {
		t.Fatal("dontSkipAny should not not be skip any")
	}

	showThese := "A,B"
	if changeShouldBeSkipped(showThese, "A") {
		t.Fatal("A should be shown")
	}
	if changeShouldBeSkipped(showThese, "B") {
		t.Fatal("B should be shown")
	}
	if !changeShouldBeSkipped(showThese, "C") {
		t.Fatal("C should not be shown")
	}

}