@@ -659,7 +659,7 @@ describe("Oblien monthly capacity contract", () => {
659659 . toThrow ( / d o e s n o t m a t c h / ) ;
660660 }
661661 } ) ;
662- it . each ( [ "past_due" , "unpaid" , "paused" , "canceled" ] as const ) ( "keeps billing readable for an expired paid month and a %s renewal" , async status => {
662+ it . each ( [ "active" , " past_due", "unpaid" , "paused" , "canceled" ] as const ) ( "keeps billing readable for an expired paid month and a %s renewal" , async status => {
663663 const state = unpaidMonthlyCloudBilling ( "org-one" , "os-one" ) ;
664664 state . subscription . status = status ;
665665 const entitlement = await setup ( state . entitlement ) . api . getEntitlement ( "os-one" ) ;
@@ -668,9 +668,8 @@ describe("Oblien monthly capacity contract", () => {
668668 expect ( entitlement ) . toMatchObject ( { status : "canceled" , computeCovered : false , capacity : { status : "expired" , computeCovered : false } } ) ;
669669 expect ( entitlement . periodEnd ) . not . toBe ( subscription ! . periodEnd ) ;
670670 } ) ;
671- it ( " still rejects funded, overlapping, foreign or inconsistent unpaid renewal records", ( ) => {
671+ it . each ( [ "active" , "past_due" ] as const ) ( " still rejects funded, overlapping, foreign or inconsistent %s renewal records", status => {
672672 for ( const mutate of [
673- ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . subscription . status = "active" ; } ,
674673 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . subscription . status = "trialing" ; } ,
675674 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . entitlement . status = "active" ; } ,
676675 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . entitlement . computeCovered = state . entitlement . capacity ! . computeCovered = true ; } ,
@@ -681,9 +680,12 @@ describe("Oblien monthly capacity contract", () => {
681680 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . subscription . periodStart = "2026-10-15T00:00:00Z" ; } ,
682681 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . subscription . periodStart = null ; } ,
683682 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . subscription . periodEnd = state . subscription . periodStart ; } ,
683+ ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . entitlement . periodStart = state . entitlement . capacity ! . periodStart = state . entitlement . periodEnd ! ; } ,
684684 ( state : ReturnType < typeof unpaidMonthlyCloudBilling > ) => { state . entitlement . capacity ! . periodEnd = "2026-10-31T00:00:00Z" ; } ,
685685 ] ) {
686- const state = unpaidMonthlyCloudBilling ( ) ; mutate ( state ) ;
686+ const state = unpaidMonthlyCloudBilling ( ) ;
687+ state . subscription . status = status ;
688+ mutate ( state ) ;
687689 expect ( ( ) => assertOblienEntitlementMatchesSubscription ( state . entitlement , state . subscription ) ) . toThrow ( / d o e s n o t m a t c h / ) ;
688690 }
689691 } ) ;
0 commit comments