mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
23 lines
533 B
Go
23 lines
533 B
Go
|
package app
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/mattermost/focalboard/server/services/config"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestSetConfig(t *testing.T) {
|
||
|
th, tearDown := SetupTestHelper(t)
|
||
|
defer tearDown()
|
||
|
|
||
|
t.Run("Test Update Config", func(t *testing.T) {
|
||
|
require.False(t, th.App.config.EnablePublicSharedBoards)
|
||
|
newConfiguration := config.Configuration{}
|
||
|
newConfiguration.EnablePublicSharedBoards = true
|
||
|
th.App.SetConfig(&newConfiguration)
|
||
|
|
||
|
require.True(t, th.App.config.EnablePublicSharedBoards)
|
||
|
})
|
||
|
}
|