Add test for entity/keyword.go
This commit is contained in:
parent
11f29ba5e4
commit
a9f55ed73f
1 changed files with 19 additions and 0 deletions
19
internal/entity/keyword_test.go
Normal file
19
internal/entity/keyword_test.go
Normal 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)
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue