role color stuff
This commit is contained in:
parent
41d48bf60a
commit
f72c7a357b
9 changed files with 165 additions and 14 deletions
17
utils/template_fns_test.go
Normal file
17
utils/template_fns_test.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package utils_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.sapphic.engineer/roleypoly/v4/types"
|
||||
"git.sapphic.engineer/roleypoly/v4/utils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRoleInputID(t *testing.T) {
|
||||
assert.Equal(t, "category-123_role-456", utils.RoleInputID(&types.Category{ID: "123"}, &types.Role{ID: "456"}))
|
||||
}
|
||||
|
||||
func TestRoleInputName(t *testing.T) {
|
||||
assert.Equal(t, "category_group_123", utils.RoleInputName(&types.Category{ID: "123"}))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue