summaryrefslogtreecommitdiffstats
path: root/model/permission_test.go
blob: cef72af90e56a964f3aa3568c6b24938ee6117f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package model

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

// This is a test to ensure that we don't accidentally add more permissions than can fit
// in the database column for role permissions.
func TestPermissionsLength(t *testing.T) {
	permissionsString := ""
	for _, permission := range ALL_PERMISSIONS {
		permissionsString += " " + permission.Id
	}

	assert.True(t, len(permissionsString) < 4096)
}