diff options
author | Corey Hulen <corey@hulen.com> | 2016-04-04 08:15:13 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-04-04 08:15:13 -0700 |
commit | 578749d08315945020fcf4466a6f0709a128dbbf (patch) | |
tree | 190561a505b5f51bafd570c2c8c48196761a49e0 /model/command_test.go | |
parent | ead8e64ccb42081272bca1a498a08c05825ce9d0 (diff) | |
parent | 74daec08ce7f1b6a09e4b364f45b0f05f3c28a9e (diff) | |
download | chat-578749d08315945020fcf4466a6f0709a128dbbf.tar.gz chat-578749d08315945020fcf4466a6f0709a128dbbf.tar.bz2 chat-578749d08315945020fcf4466a6f0709a128dbbf.zip |
Merge pull request #2584 from hmhealey/plt2054
PLT-2054 Add DisplayName and Description fields for integrations
Diffstat (limited to 'model/command_test.go')
-rw-r--r-- | model/command_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/model/command_test.go b/model/command_test.go index 0581625d9..d362d8f2c 100644 --- a/model/command_test.go +++ b/model/command_test.go @@ -84,6 +84,26 @@ func TestCommandIsValid(t *testing.T) { if err := o.IsValid(); err != nil { t.Fatal(err) } + + o.DisplayName = strings.Repeat("1", 65) + if err := o.IsValid(); err == nil { + t.Fatal("should be invalid") + } + + o.DisplayName = strings.Repeat("1", 64) + if err := o.IsValid(); err != nil { + t.Fatal(err) + } + + o.Description = strings.Repeat("1", 129) + if err := o.IsValid(); err == nil { + t.Fatal("should be invalid") + } + + o.Description = strings.Repeat("1", 128) + if err := o.IsValid(); err != nil { + t.Fatal(err) + } } func TestCommandPreSave(t *testing.T) { |