diff options
Diffstat (limited to 'model/post_test.go')
-rw-r--r-- | model/post_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |