about summary refs log blame commit diff
path: root/fun/clbot/clbot_test.go
blob: 567540c364f728f35ea4bfe815fa9eb278aa0017 (plain) (tree)























                                                                 
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")
	}

}