lavender/server/roles_test.go

12 lines
296 B
Go
Raw Normal View History

2024-02-07 01:18:17 +00:00
package server
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestHasRole(t *testing.T) {
2024-09-13 15:31:40 +01:00
assert.True(t, HasRole([]string{"lavender:admin", "test:something-else"}, "lavender:admin"))
assert.False(t, HasRole([]string{"lavender:", "test:something-else"}, "lavender:admin"))
2024-02-07 01:18:17 +00:00
}