add test for license check

This commit is contained in:
Shawn Smith
2016-11-14 14:21:58 +09:00
parent ed54891cae
commit 927aa0bf5f
2 changed files with 14 additions and 0 deletions

14
check/license_test.go Normal file
View File

@@ -0,0 +1,14 @@
package check
import "testing"
func TestPercentage(t *testing.T) {
g := License{"testfiles", []string{}}
p, _, err := g.Percentage()
if err != nil {
t.Fatal(err)
}
if p != 1.0 {
t.Errorf("License check failed")
}
}

View File