website/pkg/config/admin_scopes_test.go

22 lines
508 B
Go

package config_test
import (
"testing"
"code.nonshy.com/nonshy/website/pkg/config"
)
// TestAdminScopesCount validates that all named admin scopes are
// returned by the scope list function.
func TestAdminScopesCount(t *testing.T) {
var scopes = config.ListAdminScopes()
if len(scopes) != config.QuantityAdminScopes {
t.Errorf(
"The list of scopes returned by ListAdminScopes doesn't match the expected count. "+
"Expected %d, got %d",
config.QuantityAdminScopes,
len(scopes),
)
}
}