mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
838c6f90b7
* initial commit for setting shared board configuration * add unit test * working again * update default config * initial commit for setting shared board configuration * add unit test * working again * update default config * add unit tests, some clean up * more cleanup * more clean up * remove header text for GH-1105 * remove unnecessary logs * update text * fix lint errors * more lint fixes * webapp lint fixes * Update mattermost-plugin/plugin.json Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com> * Update mattermost-plugin/plugin.json Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com> * update for review, sync with main Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
27 lines
699 B
Go
27 lines
699 B
Go
package app
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/mattermost/focalboard/server/services/config"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGetClientConfig(t *testing.T) {
|
|
th, tearDown := SetupTestHelper(t)
|
|
defer tearDown()
|
|
|
|
t.Run("Test Get Client Config", func(t *testing.T) {
|
|
newConfiguration := config.Configuration{}
|
|
newConfiguration.Telemetry = true
|
|
newConfiguration.TelemetryID = "abcde"
|
|
newConfiguration.EnablePublicSharedBoards = true
|
|
th.App.SetConfig(&newConfiguration)
|
|
|
|
clientConfig := th.App.GetClientConfig()
|
|
require.True(t, clientConfig.EnablePublicSharedBoards)
|
|
require.True(t, clientConfig.Telemetry)
|
|
require.Equal(t, "abcde", clientConfig.TelemetryID)
|
|
})
|
|
}
|