diff options
author | George Goldberg <george@gberg.me> | 2017-12-20 19:29:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-20 19:29:43 +0000 |
commit | dcc20167557aa1f85943410a898baf62f142bfde (patch) | |
tree | abd3d6a35ee0e9437c48149f81cb46e64cb6c635 /store/storetest/user_store.go | |
parent | 0a2ffbc73797c5e95450d6ae65e4dc960b688da7 (diff) | |
download | chat-dcc20167557aa1f85943410a898baf62f142bfde.tar.gz chat-dcc20167557aa1f85943410a898baf62f142bfde.tar.bz2 chat-dcc20167557aa1f85943410a898baf62f142bfde.zip |
PLT-8354: Fix user search error when terms end up as empty space. (#7984)
Diffstat (limited to 'store/storetest/user_store.go')
-rw-r--r-- | store/storetest/user_store.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/store/storetest/user_store.go b/store/storetest/user_store.go index ce1fb4a86..3b2bf502b 100644 --- a/store/storetest/user_store.go +++ b/store/storetest/user_store.go @@ -8,6 +8,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/store" ) @@ -1817,6 +1819,10 @@ func testUserStoreSearch(t *testing.T, ss store.Store) { t.Fatal("should have found user") } } + + // Check PLT-8354 - search that ends up with just space for terms doesn't error. + r1 := <-ss.User().SearchWithoutTeam("* ", searchOptions) + assert.Nil(t, r1.Err) } func testUserStoreSearchWithoutTeam(t *testing.T, ss store.Store) { |