mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-8131 (part2) Add plugin key value store support (#7902)
* Add plugin key value store support * Add localization strings * Updates per feedback
This commit is contained in:
22
model/plugin_key_value_test.go
Normal file
22
model/plugin_key_value_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPluginKeyIsValid(t *testing.T) {
|
||||
kv := PluginKeyValue{PluginId: "someid", Key: "somekey", Value: []byte("somevalue")}
|
||||
assert.Nil(t, kv.IsValid())
|
||||
|
||||
kv.PluginId = ""
|
||||
assert.NotNil(t, kv.IsValid())
|
||||
|
||||
kv.PluginId = "someid"
|
||||
kv.Key = ""
|
||||
assert.NotNil(t, kv.IsValid())
|
||||
}
|
||||
Reference in New Issue
Block a user