summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-08 02:07:17 -0800
committerGitHub <noreply@github.com>2017-02-08 02:07:17 -0800
commitf1c9ae568662ece61ba58f28a02c4b0875dce8b0 (patch)
treeb43d2a2b1e8bb7e3a5f51c6bc3acacd8f5f2b1c0 /store/sql_post_store_test.go
parent0162d8ad08815b9b833fc651c7e185eab48cbbb2 (diff)
downloadchat-f1c9ae568662ece61ba58f28a02c4b0875dce8b0.tar.gz
chat-f1c9ae568662ece61ba58f28a02c4b0875dce8b0.tar.bz2
chat-f1c9ae568662ece61ba58f28a02c4b0875dce8b0.zip
Error on blank post IDs for get post query (#5326)
Diffstat (limited to 'store/sql_post_store_test.go')
-rw-r--r--store/sql_post_store_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/store/sql_post_store_test.go b/store/sql_post_store_test.go
index 626894a2a..08fe1282e 100644
--- a/store/sql_post_store_test.go
+++ b/store/sql_post_store_test.go
@@ -61,6 +61,10 @@ func TestPostStoreGet(t *testing.T) {
if err := (<-store.Post().Get("123")).Err; err == nil {
t.Fatal("Missing id should have failed")
}
+
+ if err := (<-store.Post().Get("")).Err; err == nil {
+ t.Fatal("should fail for blank post ids")
+ }
}
func TestPostStoreGetSingle(t *testing.T) {