24 lines
651 B
Go
24 lines
651 B
Go
package billing
|
|||
|
|
|
||
|
|
import "testing"
|
||
|
|
|
||
|
|
func TestIsSuperAdminPlan(t *testing.T) {
|
||
|
|
t.Parallel()
|
||
|
|
if !IsSuperAdminPlan("Super Admin") || !IsSuperAdminPlan("super admin") {
|
||
|
|
t.Fatal("expected Super Admin name match")
|
||
|
|
}
|
||
|
|
if IsSuperAdminPlan("Enterprise") || IsSuperAdminPlan("") {
|
||
|
|
t.Fatal("Enterprise / empty must not match Super Admin")
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func TestSuperAdminPlanNotPublic(t *testing.T) {
|
||
|
|
t.Parallel()
|
||
|
|
if IsPublicProductPlan(SuperAdminPlanName) {
|
||
|
|
t.Fatal("Super Admin must stay off the public pricing ladder")
|
||
|
|
}
|
||
|
|
if !IsCustomPackage(SuperAdminPlanName, true) {
|
||
|
|
t.Fatal("Super Admin with is_custom must unlock via custom package defaults")
|
||
|
|
}
|
||
|
|
}
|