diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-08 02:07:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 02:07:17 -0800 |
commit | f1c9ae568662ece61ba58f28a02c4b0875dce8b0 (patch) | |
tree | b43d2a2b1e8bb7e3a5f51c6bc3acacd8f5f2b1c0 /store/sql_post_store_test.go | |
parent | 0162d8ad08815b9b833fc651c7e185eab48cbbb2 (diff) | |
download | chat-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.go | 4 |
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) { |