Add test for entity/keyword.go

This commit is contained in:
Theresa Gresch 2019-12-17 18:26:33 +01:00
parent 11f29ba5e4
commit a9f55ed73f

View file

@ -0,0 +1,19 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestNewKeyword(t *testing.T) {
t.Run("cat", func(t *testing.T) {
keyword := NewKeyword("cat")
assert.Equal(t, "cat", keyword.Keyword)
assert.Equal(t, false, keyword.Skip)
})
t.Run("TABle", func(t *testing.T) {
keyword := NewKeyword("TABle")
assert.Equal(t, "table", keyword.Keyword)
assert.Equal(t, false, keyword.Skip)
})
}