github.com/nhannv/mattermost-server@v5.11.1+incompatible/cmd/mattermost/commands/permissions_test.go (about)

     1  // Copyright (c) 2018-present Mattermost, Inc. All Rights Reserved.
     2  // See License.txt for license information.
     3  
     4  package commands
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/stretchr/testify/assert"
    10  
    11  	"github.com/mattermost/mattermost-server/utils"
    12  )
    13  
    14  func TestPermissionsExport_rejectsUnlicensed(t *testing.T) {
    15  	th := Setup().InitBasic()
    16  	defer th.TearDown()
    17  
    18  	actual, _ := th.RunCommandWithOutput(t, "permissions", "export")
    19  	assert.Contains(t, actual, utils.T("cli.license.critical"))
    20  }
    21  
    22  func TestPermissionsImport_rejectsUnlicensed(t *testing.T) {
    23  	th := Setup().InitBasic()
    24  	defer th.TearDown()
    25  
    26  	actual, _ := th.RunCommandWithOutput(t, "permissions", "import")
    27  
    28  	assert.Contains(t, actual, utils.T("cli.license.critical"))
    29  }