@@ -91,6 +91,7 @@ describe('RootSaga', () => {
91
91
username : 'gonzo' ,
92
92
other : 'data' ,
93
93
} ;
94
+ const countries = [ { code : 'AX' , name : 'Åland Islands' } , { code : 'AL' , name : 'Albania' } ] ;
94
95
getAuthenticatedUser . mockReturnValue ( userAccount ) ;
95
96
const selectorData = {
96
97
userAccount,
@@ -99,7 +100,7 @@ describe('RootSaga', () => {
99
100
const action = profileActions . fetchProfile ( 'booyah' ) ;
100
101
const gen = handleFetchProfile ( action ) ;
101
102
102
- const result = [ { } , [ 1 , 2 , 3 ] , [ { code : 'AX' , name : 'Åland Islands' } , { code : 'AL' , name : 'Albania' } ] ] ;
103
+ const result = [ { } , [ 1 , 2 , 3 ] , countries ] ;
103
104
104
105
expect ( gen . next ( ) . value ) . toEqual ( select ( userAccountSelector ) ) ;
105
106
expect ( gen . next ( selectorData ) . value ) . toEqual ( put ( profileActions . fetchProfileBegin ( ) ) ) ;
@@ -109,7 +110,7 @@ describe('RootSaga', () => {
109
110
call ( ProfileApiService . getCountryList ) ,
110
111
] ) ) ;
111
112
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 ) ) ) ;
113
114
expect ( gen . next ( ) . value ) . toEqual ( put ( profileActions . fetchProfileReset ( ) ) ) ;
114
115
expect ( gen . next ( ) . value ) . toBeUndefined ( ) ;
115
116
} ) ;
0 commit comments