summaryrefslogtreecommitdiffstats
path: root/model/license_test.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-05-09 13:56:07 +0100
committerJoram Wilander <jwawilander@gmail.com>2017-05-09 07:56:07 -0500
commitb25021b9129820147bf596b834d438ef218acf28 (patch)
tree5a50c3e8b6ddb97a9ec30ccdcf12f4f2e3e85029 /model/license_test.go
parentf88769d1f2ba7f2097e9a545e18fb0c5eb4ea2e9 (diff)
downloadchat-b25021b9129820147bf596b834d438ef218acf28.tar.gz
chat-b25021b9129820147bf596b834d438ef218acf28.tar.bz2
chat-b25021b9129820147bf596b834d438ef218acf28.zip
PLT-6504: Add ElasticSearch feature to license. (#6339)
Diffstat (limited to 'model/license_test.go')
-rw-r--r--model/license_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/model/license_test.go b/model/license_test.go
index 1c6a277e8..8b65d0700 100644
--- a/model/license_test.go
+++ b/model/license_test.go
@@ -25,6 +25,7 @@ func TestLicenseFeaturesToMap(t *testing.T) {
CheckTrue(t, m["mhpns"].(bool))
CheckTrue(t, m["saml"].(bool))
CheckTrue(t, m["password"].(bool))
+ CheckTrue(t, m["elastic_search"].(bool))
CheckTrue(t, m["future"].(bool))
}
@@ -44,6 +45,7 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
CheckTrue(t, *f.MHPNS)
CheckTrue(t, *f.SAML)
CheckTrue(t, *f.PasswordRequirements)
+ CheckTrue(t, *f.ElasticSearch)
CheckTrue(t, *f.FutureFeatures)
f = Features{}
@@ -62,6 +64,7 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
*f.MHPNS = true
*f.SAML = true
*f.PasswordRequirements = true
+ *f.ElasticSearch = true
f.SetDefaults()
@@ -77,6 +80,7 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
CheckTrue(t, *f.MHPNS)
CheckTrue(t, *f.SAML)
CheckTrue(t, *f.PasswordRequirements)
+ CheckTrue(t, *f.ElasticSearch)
CheckFalse(t, *f.FutureFeatures)
}
@@ -157,6 +161,7 @@ func TestLicenseToFromJson(t *testing.T) {
CheckBool(t, *f1.MHPNS, *f.MHPNS)
CheckBool(t, *f1.SAML, *f.SAML)
CheckBool(t, *f1.PasswordRequirements, *f.PasswordRequirements)
+ CheckBool(t, *f1.ElasticSearch, *f.ElasticSearch)
CheckBool(t, *f1.FutureFeatures, *f.FutureFeatures)
invalid := `{"asdf`