diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-01-14 08:24:47 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-01-14 08:24:47 -0500 |
commit | 7d383319df2adf578eb4b2b29555846a7c848049 (patch) | |
tree | d8283b12c2a1b14c18da4ae446f5c2ca0e5d0af5 /model/license_test.go | |
parent | 53b0cd8f2a24798c67505aa447b1d53b9f14197e (diff) | |
parent | c26edcf6786fd8aa1535c09e9581fc6417cddda4 (diff) | |
download | chat-7d383319df2adf578eb4b2b29555846a7c848049.tar.gz chat-7d383319df2adf578eb4b2b29555846a7c848049.tar.bz2 chat-7d383319df2adf578eb4b2b29555846a7c848049.zip |
Merge pull request #1887 from mattermost/editions
Editions
Diffstat (limited to 'model/license_test.go')
-rw-r--r-- | model/license_test.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/model/license_test.go b/model/license_test.go new file mode 100644 index 000000000..25c74a2e3 --- /dev/null +++ b/model/license_test.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package model + +import ( + "testing" +) + +func TestLicenseExpired(t *testing.T) { + l1 := License{} + l1.ExpiresAt = GetMillis() - 1000 + if !l1.IsExpired() { + t.Fatal("license should be expired") + } + + l1.ExpiresAt = GetMillis() + 10000 + if l1.IsExpired() { + t.Fatal("license should not be expired") + } +} + +func TestLicenseStarted(t *testing.T) { + l1 := License{} + l1.StartsAt = GetMillis() - 1000 + if !l1.IsStarted() { + t.Fatal("license should be started") + } + + l1.StartsAt = GetMillis() + 10000 + if l1.IsStarted() { + t.Fatal("license should not be started") + } +} |