diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-08-31 09:03:11 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-31 09:03:11 -0400 |
commit | ccb5d076d5fbb96de29492633ca83ecc30f36b37 (patch) | |
tree | b04191979b43f14a05454488bc1248084c010ec9 /store/sql_post_store_test.go | |
parent | 2384fe0c7b682aa9b97f2cd33b3bfa24a79b98c6 (diff) | |
parent | b69221aa7fec759edb856e7b44ee24769b87486d (diff) | |
download | chat-ccb5d076d5fbb96de29492633ca83ecc30f36b37.tar.gz chat-ccb5d076d5fbb96de29492633ca83ecc30f36b37.tar.bz2 chat-ccb5d076d5fbb96de29492633ca83ecc30f36b37.zip |
Merge pull request #475 from nickago/MM-1773
MM-1773a Add wildcard searching for postgresql
Diffstat (limited to 'store/sql_post_store_test.go')
-rw-r--r-- | store/sql_post_store_test.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/store/sql_post_store_test.go b/store/sql_post_store_test.go index 4564e2deb..d48dea51c 100644 --- a/store/sql_post_store_test.go +++ b/store/sql_post_store_test.go @@ -4,11 +4,11 @@ package store import ( - "github.com/mattermost/platform/model" - "github.com/mattermost/platform/utils" "strings" "testing" "time" + + "github.com/mattermost/platform/model" ) func TestPostStoreSave(t *testing.T) { @@ -547,11 +547,9 @@ func TestPostStoreSearch(t *testing.T) { t.Fatal("returned wrong serach result") } - if utils.Cfg.SqlSettings.DriverName == "mysql" { - r5 := (<-store.Post().Search(teamId, userId, "matter*", false)).Data.(*model.PostList) - if len(r5.Order) != 1 && r5.Order[0] != o1.Id { - t.Fatal("returned wrong serach result") - } + r5 := (<-store.Post().Search(teamId, userId, "matter*", false)).Data.(*model.PostList) + if len(r5.Order) != 1 && r5.Order[0] != o1.Id { + t.Fatal("returned wrong serach result") } r6 := (<-store.Post().Search(teamId, userId, "#hashtag", true)).Data.(*model.PostList) @@ -573,4 +571,9 @@ func TestPostStoreSearch(t *testing.T) { if len(r9.Order) != 2 { t.Fatal("returned wrong search result") } + + r10 := (<-store.Post().Search(teamId, userId, "matter* jer*", false)).Data.(*model.PostList) + if len(r10.Order) != 2 { + t.Fatal("returned wrong search result") + } } |