@@ -8,68 +8,85 @@ import chai from 'chai';
88chai . should ( ) ;
99let assert = chai . assert ;
1010
11- describe ( "UserManagerSettings" , function ( ) {
11+ describe ( "UserManagerSettings" , function ( ) {
1212
13- beforeEach ( function ( ) {
13+ beforeEach ( function ( ) {
1414 Log . logger = console ;
1515 Log . level = Log . NONE ;
1616 } ) ;
1717
18- describe ( "constructor" , function ( ) {
18+ describe ( "constructor" , function ( ) {
1919
20- it ( "should allow no settings" , function ( ) {
20+ it ( "should allow no settings" , function ( ) {
2121 let subject = new UserManagerSettings ( ) ;
2222 } ) ;
23-
24- it ( "should pass settings to base class" , function ( ) {
23+
24+ it ( "should pass settings to base class" , function ( ) {
2525 let subject = new UserManagerSettings ( { client_id : 'client' } ) ;
2626 subject . client_id . should . equal ( 'client' ) ;
2727 } ) ;
2828
2929 } ) ;
3030
31- describe ( "popup_redirect_uri" , function ( ) {
31+ describe ( "popup_redirect_uri" , function ( ) {
3232
33- it ( "should return value from initial settings" , function ( ) {
33+ it ( "should return value from initial settings" , function ( ) {
3434 let subject = new UserManagerSettings ( { popup_redirect_uri : 'test' } ) ;
3535 subject . popup_redirect_uri . should . equal ( 'test' ) ;
3636 } ) ;
3737
3838 } ) ;
39-
40- describe ( "silent_redirect_uri" , function ( ) {
4139
42- it ( "should return value from initial settings" , function ( ) {
40+ describe ( "silent_redirect_uri" , function ( ) {
41+
42+ it ( "should return value from initial settings" , function ( ) {
4343 let subject = new UserManagerSettings ( { silent_redirect_uri : 'test' } ) ;
4444 subject . silent_redirect_uri . should . equal ( 'test' ) ;
4545 } ) ;
4646
4747 } ) ;
48-
49- describe ( "automaticSilentRenewEnabled" , function ( ) {
5048
51- it ( "should return value from initial settings" , function ( ) {
52- let subject = new UserManagerSettings ( {
53- silent_redirect_uri : 'test' ,
54- enableAutomaticSilentRenew : false
49+ describe ( "automaticSilentRenewEnabled" , function ( ) {
50+
51+ it ( "should return value from initial settings" , function ( ) {
52+ let subject = new UserManagerSettings ( {
53+ silent_redirect_uri : 'test' ,
54+ enableAutomaticSilentRenew : false
5555 } ) ;
5656 subject . automaticSilentRenewEnabled . should . be . false ;
5757 } ) ;
58-
59- it ( "should use default value" , function ( ) {
60- let subject = new UserManagerSettings ( {
61- silent_redirect_uri : 'test'
58+
59+ it ( "should use default value" , function ( ) {
60+ let subject = new UserManagerSettings ( {
61+ silent_redirect_uri : 'test'
6262 } ) ;
6363 subject . automaticSilentRenewEnabled . should . be . true ;
6464 } ) ;
65-
66- it ( "should be false if no silent redirect uri" , function ( ) {
67- let subject = new UserManagerSettings ( {
68- enableAutomaticSilentRenew : true
65+
66+ it ( "should be false if no silent redirect uri" , function ( ) {
67+ let subject = new UserManagerSettings ( {
68+ enableAutomaticSilentRenew : true
6969 } ) ;
7070 subject . automaticSilentRenewEnabled . should . be . false ;
7171 } ) ;
7272
7373 } ) ;
7474
75+ describe ( "expiringNotificationTime" , function ( ) {
76+
77+ it ( "should return value from initial settings" , function ( ) {
78+ let subject = new UserManagerSettings ( {
79+ expiringNotificationTime : 10
80+ } ) ;
81+ subject . expiringNotificationTime . should . equal ( 10 ) ;
82+ } ) ;
83+
84+ it ( "should use default value" , function ( ) {
85+ let subject = new UserManagerSettings ( {
86+ } ) ;
87+ subject . expiringNotificationTime . should . equal ( 60 ) ;
88+ } ) ;
89+
90+ } ) ;
91+
7592} ) ;
0 commit comments