16 lines
559 B
Go
16 lines
559 B
Go
package domain
|
|
|
|
import "testing"
|
|
|
|
func TestEffectiveContentAccessTier(t *testing.T) {
|
|
if got := EffectiveContentAccessTier(ContentAccessFree, ContentAccessFree); got != ContentAccessFree {
|
|
t.Fatalf("expected FREE, got %s", got)
|
|
}
|
|
if got := EffectiveContentAccessTier(ContentAccessFree, ContentAccessPremium); got != ContentAccessPremium {
|
|
t.Fatalf("expected PREMIUM, got %s", got)
|
|
}
|
|
if got := EffectiveContentAccessTier(ContentAccessPremium, ContentAccessFree); got != ContentAccessPremium {
|
|
t.Fatalf("expected cascaded PREMIUM, got %s", got)
|
|
}
|
|
}
|