@@ -29,6 +29,8 @@ describe('controllerApp'.bold.underline.blue, function () {
2929 poppa : {
3030 trialDaysRemaining : sinon . stub ( ) ,
3131 isInTrial : sinon . stub ( ) ,
32+ isInGrace : sinon . stub ( ) ,
33+ isGraceExpired : sinon . stub ( ) ,
3234 attrs : {
3335 hasPaymentMethod : false
3436 }
@@ -204,9 +206,9 @@ describe('controllerApp'.bold.underline.blue, function () {
204206 beforeEach ( function ( ) {
205207 var controllerSetupFn = setup ( true ) ;
206208 mockFeatureFlags . flags . billing = true ;
207- ctx . fakeuser . isInGrace . returns ( true ) ;
208- ctx . fakeuser . isGraceExpired . returns ( false ) ;
209- ctx . fakeuser . attrs . hasPaymentMethod = true ;
209+ mockCurrentOrg . poppa . isInGrace . returns ( true ) ;
210+ mockCurrentOrg . poppa . isGraceExpired . returns ( false ) ;
211+ mockCurrentOrg . poppa . attrs . hasPaymentMethod = true ;
210212 controllerSetupFn ( ) ;
211213 $rootScope . $digest ( ) ;
212214 } ) ;
@@ -225,9 +227,9 @@ describe('controllerApp'.bold.underline.blue, function () {
225227 beforeEach ( function ( ) {
226228 var controllerSetupFn = setup ( true ) ;
227229 mockFeatureFlags . flags . billing = true ;
228- ctx . fakeuser . isInGrace . returns ( true ) ;
229- ctx . fakeuser . isGraceExpired . returns ( false ) ;
230- ctx . fakeuser . attrs . hasPaymentMethod = false ;
230+ mockCurrentOrg . poppa . isInGrace . returns ( true ) ;
231+ mockCurrentOrg . poppa . isGraceExpired . returns ( false ) ;
232+ mockCurrentOrg . poppa . attrs . hasPaymentMethod = false ;
231233 controllerSetupFn ( ) ;
232234 $rootScope . $digest ( ) ;
233235 } ) ;
@@ -249,9 +251,9 @@ describe('controllerApp'.bold.underline.blue, function () {
249251 beforeEach ( function ( ) {
250252 var controllerSetupFn = setup ( true ) ;
251253 mockFeatureFlags . flags . billing = true ;
252- ctx . fakeuser . isInGrace . returns ( false ) ;
253- ctx . fakeuser . isGraceExpired . returns ( true ) ;
254- ctx . fakeuser . attrs . hasPaymentMethod = true ;
254+ mockCurrentOrg . poppa . isInGrace . returns ( false ) ;
255+ mockCurrentOrg . poppa . isGraceExpired . returns ( true ) ;
256+ mockCurrentOrg . poppa . attrs . hasPaymentMethod = true ;
255257 controllerSetupFn ( ) ;
256258 $rootScope . $digest ( ) ;
257259 } ) ;
@@ -271,9 +273,9 @@ describe('controllerApp'.bold.underline.blue, function () {
271273 beforeEach ( function ( ) {
272274 var controllerSetupFn = setup ( true ) ;
273275 mockFeatureFlags . flags . billing = true ;
274- ctx . fakeuser . isInGrace . returns ( false ) ;
275- ctx . fakeuser . isGraceExpired . returns ( true ) ;
276- ctx . fakeuser . attrs . hasPaymentMethod = false ;
276+ mockCurrentOrg . poppa . isInGrace . returns ( false ) ;
277+ mockCurrentOrg . poppa . isGraceExpired . returns ( true ) ;
278+ mockCurrentOrg . poppa . attrs . hasPaymentMethod = false ;
277279 controllerSetupFn ( ) ;
278280 $rootScope . $digest ( ) ;
279281 } ) ;
0 commit comments