@@ -91,6 +91,7 @@ describe('RootSaga', () => {
9191 username : 'gonzo' ,
9292 other : 'data' ,
9393 } ;
94+ const countries = [ { code : 'AX' , name : 'Åland Islands' } , { code : 'AL' , name : 'Albania' } ] ;
9495 getAuthenticatedUser . mockReturnValue ( userAccount ) ;
9596 const selectorData = {
9697 userAccount,
@@ -99,7 +100,7 @@ describe('RootSaga', () => {
99100 const action = profileActions . fetchProfile ( 'booyah' ) ;
100101 const gen = handleFetchProfile ( action ) ;
101102
102- const result = [ { } , [ 1 , 2 , 3 ] , [ { code : 'AX' , name : 'Åland Islands' } , { code : 'AL' , name : 'Albania' } ] ] ;
103+ const result = [ { } , [ 1 , 2 , 3 ] , countries ] ;
103104
104105 expect ( gen . next ( ) . value ) . toEqual ( select ( userAccountSelector ) ) ;
105106 expect ( gen . next ( selectorData ) . value ) . toEqual ( put ( profileActions . fetchProfileBegin ( ) ) ) ;
@@ -109,7 +110,7 @@ describe('RootSaga', () => {
109110 call ( ProfileApiService . getCountryList ) ,
110111 ] ) ) ;
111112 expect ( gen . next ( result ) . value )
112- . toEqual ( put ( profileActions . fetchProfileSuccess ( result [ 0 ] , { } , result [ 1 ] , false , [ { code : 'AX' , name : 'Åland Islands' } , { code : 'AL' , name : 'Albania' } ] ) ) ) ;
113+ . toEqual ( put ( profileActions . fetchProfileSuccess ( result [ 0 ] , { } , result [ 1 ] , false , countries ) ) ) ;
113114 expect ( gen . next ( ) . value ) . toEqual ( put ( profileActions . fetchProfileReset ( ) ) ) ;
114115 expect ( gen . next ( ) . value ) . toBeUndefined ( ) ;
115116 } ) ;
0 commit comments