* generalize admins and email info with store interface * lint: missing group comment * fix admin group with shared substruct
18 lines
331 B
Go
18 lines
331 B
Go
package admin
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestStaticStore_Get(t *testing.T) {
|
|
var ks Store = NewStaticStore([]string{"123", "xyz"}, "aa@example.com")
|
|
|
|
a := ks.Admins("any")
|
|
assert.Equal(t, []string{"123", "xyz"}, a)
|
|
|
|
email := ks.Email("blah")
|
|
assert.Equal(t, "aa@example.com", email)
|
|
}
|