Files
mattermost/utils/utils_test.go
2016-05-27 08:35:55 -07:00

31 lines
446 B
Go

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package utils
import (
"testing"
)
func TestStringArrayIntersection(t *testing.T) {
a := []string{
"abc",
"def",
"ghi",
}
b := []string{
"jkl",
}
c := []string{
"def",
}
if len(StringArrayIntersection(a, b)) != 0 {
t.Fatal("should be 0")
}
if len(StringArrayIntersection(a, c)) != 1 {
t.Fatal("should be 1")
}
}