mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 11:30:15 +00:00
17 lines
480 B
Go
17 lines
480 B
Go
package api
|
|
|
|
import "testing"
|
|
|
|
func TestMultiTenantOrganizationLoader_NoPersistence(t *testing.T) {
|
|
loader := NewMultiTenantOrganizationLoader(nil)
|
|
if _, err := loader.GetOrganization("org"); err == nil {
|
|
t.Fatalf("expected error when persistence is nil")
|
|
}
|
|
}
|
|
|
|
func TestDefaultAuthorizationChecker_CanAccessOrg_Default(t *testing.T) {
|
|
checker := NewAuthorizationChecker(nil)
|
|
if !checker.CanAccessOrg("user", nil, "default") {
|
|
t.Fatalf("expected default org access")
|
|
}
|
|
}
|