diff options
author | George Goldberg <george@gberg.me> | 2018-03-27 22:36:55 +0100 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2018-03-27 22:36:55 +0100 |
commit | 71c9dff7662868770f66ab876ad66b354133c2c1 (patch) | |
tree | e2d5d8c5ad203b42af868ee18399c42a9ab08385 /model/permission_test.go | |
parent | 2af4c7e6496d4c5192fedf5001817f6f1eb3664b (diff) | |
parent | e13e64711f7a7e8ceadb8cbc6af72c4022c95b36 (diff) | |
download | chat-71c9dff7662868770f66ab876ad66b354133c2c1.tar.gz chat-71c9dff7662868770f66ab876ad66b354133c2c1.tar.bz2 chat-71c9dff7662868770f66ab876ad66b354133c2c1.zip |
Merge branch 'advanced-permissions-phase-1'
Diffstat (limited to 'model/permission_test.go')
-rw-r--r-- | model/permission_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/model/permission_test.go b/model/permission_test.go new file mode 100644 index 000000000..cef72af90 --- /dev/null +++ b/model/permission_test.go @@ -0,0 +1,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) +} |