File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ describe('LoginComponent', () => {
17
17
} ,
18
18
signIn ( ) {
19
19
return of ( ) ;
20
+ } ,
21
+ setCookies ( ) {
20
22
}
21
23
} ;
22
24
@@ -51,9 +53,11 @@ describe('LoginComponent', () => {
51
53
52
54
it ( 'should sign up or login with google if is not logged-in into the app' , inject ( [ Router ] , ( router : Router ) => {
53
55
spyOn ( azureAdB2CService , 'isLogin' ) . and . returnValue ( false ) ;
54
- spyOn ( azureAdB2CService , 'signIn' ) . and . returnValue ( of ( ) ) ;
56
+ spyOn ( azureAdB2CService , 'setCookies' ) . and . returnValue ( ) ;
57
+ spyOn ( azureAdB2CService , 'signIn' ) . and . returnValue ( of ( ( ) => { } ) ) ;
55
58
component . login ( ) ;
56
59
expect ( azureAdB2CService . signIn ) . toHaveBeenCalled ( ) ;
60
+ expect ( azureAdB2CService . setCookies ) . toHaveBeenCalled ( ) ;
57
61
} ) ) ;
58
62
59
63
it ( 'should not sign-up or login with google if is already logged-in into the app' , inject ( [ Router ] , ( router : Router ) => {
You can’t perform that action at this time.
0 commit comments