17 lines
450 B
Go
17 lines
450 B
Go
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"}))
|
|
}
|