From 1bd66589a2adc67df5df9c108a2f2ecc77dfdf44 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 27 Sep 2017 11:09:09 -0400 Subject: Allow custom post types (#7468) --- model/post_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/post_test.go') diff --git a/model/post_test.go b/model/post_test.go index 1096ccbd8..ced84f26b 100644 --- a/model/post_test.go +++ b/model/post_test.go @@ -78,6 +78,16 @@ func TestPostIsValid(t *testing.T) { if err := o.IsValid(); err != nil { t.Fatal(err) } + + o.Type = "junk" + if err := o.IsValid(); err == nil { + t.Fatal("should be invalid") + } + + o.Type = POST_CUSTOM_TYPE_PREFIX + "type" + if err := o.IsValid(); err != nil { + t.Fatal(err) + } } func TestPostPreSave(t *testing.T) { -- cgit v1.2.3-1-g7c22