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