Exam-prep content is gated by subscription/tier only. Learn English sequential locking is unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
986 B
Go
33 lines
986 B
Go
package domain
|
|
|
|
import "testing"
|
|
|
|
func TestRoleOpenLearnerBypassesSubscriptionAndSequentialLocks(t *testing.T) {
|
|
role := RoleOpenLearner
|
|
if !role.BypassesSubscription() {
|
|
t.Fatal("OPEN_LEARNER must bypass subscription gates")
|
|
}
|
|
if role.UsesLMSSequentialGating() {
|
|
t.Fatal("OPEN_LEARNER must not use Learn English sequential locking")
|
|
}
|
|
if role.UsesExamPrepSequentialGating() {
|
|
t.Fatal("OPEN_LEARNER must not use exam-prep sequential locking")
|
|
}
|
|
if !role.IsCustomerLearnerRole() {
|
|
t.Fatal("OPEN_LEARNER should be a customer learner role")
|
|
}
|
|
}
|
|
|
|
func TestRoleStudentKeepsSubscriptionAndSequentialLocks(t *testing.T) {
|
|
role := RoleStudent
|
|
if role.BypassesSubscription() {
|
|
t.Fatal("STUDENT must not bypass subscription gates")
|
|
}
|
|
if !role.UsesLMSSequentialGating() {
|
|
t.Fatal("STUDENT must use Learn English sequential / precedence locking")
|
|
}
|
|
if role.UsesExamPrepSequentialGating() {
|
|
t.Fatal("STUDENT must not use exam-prep sequential / precedence locking")
|
|
}
|
|
}
|