mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 15:44:07 +00:00
13 lines
352 B
Go
13 lines
352 B
Go
package server
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestHasRole(t *testing.T) {
|
|
assert.True(t, HasRole("lavender:admin test:something-else", "lavender:admin"))
|
|
assert.False(t, HasRole("lavender:admin,test:something-else", "lavender:admin"))
|
|
assert.False(t, HasRole("lavender: test:something-else", "lavender:admin"))
|
|
}
|