Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
LyricTian committed May 14, 2016
1 parent 217389a commit 34af050
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nodefilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ var _ = Describe("使用节点过滤器过滤敏感词数据", func() {

It("从文本中读取敏感词数据", func() {
nodeFilter = filter.NewNodeFilter([]string{"陈水扁"})
data, err := nodeFilter.Filter(&filterText, '@')
data, err := nodeFilter.Filter(filterText, '@')
if err != nil {
Fail(err.Error())
return
}
Expect(data).To(Equal([]string{"陈水扁"}))
result, err := nodeFilter.FilterResult(&filterText, '@')
result, err := nodeFilter.FilterResult(filterText, '@')
if err != nil {
Fail(err.Error())
return
Expand All @@ -59,13 +59,13 @@ var _ = Describe("使用节点过滤器过滤敏感词数据", func() {
close(chDirty)
}()
nodeFilter = filter.NewNodeChanFilter(chDirty)
data, err := nodeFilter.Filter(&filterText, '@')
data, err := nodeFilter.Filter(filterText, '@')
if err != nil {
Fail(err.Error())
return
}
Expect(data).To(Equal([]string{"陈水扁"}))
result, err := nodeFilter.FilterResult(&filterText, '@')
result, err := nodeFilter.FilterResult(filterText, '@')
if err != nil {
Fail(err.Error())
return
Expand Down

0 comments on commit 34af050

Please sign in to comment.