@@ -185,6 +185,7 @@ describe('UserEffects', () => {
185185 } ) ;
186186
187187 it ( 'action type is REMOVE_USER_FROM_GROUP_SUCCESS when service is executed succesfully' , async ( ) => {
188+ < < < << << HEAD
188189 const userId = 'userId' ;
189190 const groupName = 'groupName' ;
190191 actions$ = of ( {
@@ -211,12 +212,19 @@ describe('UserEffects', () => {
211212=== = ===
212213 type : UserActionTypes . REMOVE_USER_TO_GROUP ,
213214> >>> >>> refactor : TT - 188 refactor some names
215+ === = ===
216+ const userId = 'userId' ;
217+ const groupName = 'groupName' ;
218+ actions$ = of ( {
219+ type : UserActionTypes . REMOVE_USER_FROM_GROUP ,
220+ >>> > >>> refactor : TT - 188 refactor 'removeTo' to 'removeFrom' references
214221 userId ,
215222 groupName ,
216223 } ) ;
217224
218225 spyOn ( toastrService , 'success' ) ;
219226< < < << << HEAD
227+ < << << << HEAD
220228< << << << HEAD
221229 spyOn ( service , 'removeUserFromGroup' ) . and . returnValue ( of ( user ) ) ;
222230
@@ -236,29 +244,37 @@ describe('UserEffects', () => {
236244=== = ===
237245 spyOn ( service , 'removeUserToGroup' ) . and . returnValue ( of ( user ) ) ;
238246>>> > >>> refactor : TT - 188 refactor some names
247+ === = ===
248+ spyOn ( service , 'removeUserFromGroup' ) . and . returnValue ( of ( user ) ) ;
249+ >>> > >>> refactor : TT - 188 refactor 'removeTo' to 'removeFrom' references
239250
240- effects . removeUserToGroup $. subscribe ( ( action ) => {
241- expect ( toastrService . success ) . toHaveBeenCalledWith ( 'Remove user to group success' ) ;
242- expect ( action . type ) . toEqual ( UserActionTypes . REMOVE_USER_TO_GROUP_SUCCESS ) ;
251+ effects . removeUserFromGroup $. subscribe ( ( action ) => {
252+ expect ( toastrService . success ) . toHaveBeenCalledWith ( 'Remove user from group success' ) ;
253+ expect ( action . type ) . toEqual ( UserActionTypes . REMOVE_USER_FROM_GROUP_SUCCESS ) ;
243254 } ) ;
244255 } ) ;
245256
246- it ( 'action type is REMOVE_USER_TO_GROUP_FAIL when service is executed succesfully' , async ( ) => {
257+ it ( 'action type is REMOVE_USER_FROM_GROUP_FAIL when service is executed succesfully' , async ( ) => {
247258 const userId = 'userId' ;
248259 const groupName = 'groupName' ;
249260 actions$ = of ( {
261+ < << << << HEAD
250262<< < < < << HEAD
251263 type: UserActionTypes . REMOVE_GROUP_TO_USER ,
252264> >>> >>> feat : TT - 188 add ngrx flow & test
253265=== = ===
254266 type : UserActionTypes . REMOVE_USER_TO_GROUP ,
255267> >>> >>> refactor : TT - 188 refactor some names
268+ === = ===
269+ type : UserActionTypes . REMOVE_USER_FROM_GROUP ,
270+ > >>> >>> refactor : TT - 188 refactor 'removeTo' to 'removeFrom' references
256271 userId ,
257272 groupName ,
258273 } ) ;
259274
260275 spyOn ( toastrService , 'error' ) ;
261276< < < << << HEAD
277+ < << << << HEAD
262278< << << << HEAD
263279 spyOn ( service , 'removeUserFromGroup' ) . and . returnValue ( throwError ( { error : { message : 'error' } } ) ) ;
264280
@@ -270,15 +286,22 @@ describe('UserEffects', () => {
270286= === ===
271287 spyOn ( service , 'removeUserToGroup' ) . and . returnValue ( throwError ( { error : { message : 'error' } } ) ) ;
272288> >>> >>> refactor: TT - 188 refactor some names
289+ === = ===
290+ spyOn ( service , 'removeUserFromGroup' ) . and . returnValue ( throwError ( { error : { message : 'error' } } ) ) ;
291+ > >>> >>> refactor: TT - 188 refactor 'removeTo' to 'removeFrom' references
273292
274- effects . removeUserToGroup $. subscribe ( ( action ) => {
293+ effects . removeUserFromGroup $. subscribe ( ( action ) => {
275294 expect ( toastrService . error ) . toHaveBeenCalled ( ) ;
295+ < < < << << HEAD
276296< << << << HEAD
277297 expect ( action . type ) . toEqual ( UserActionTypes . REMOVE_GROUP_TO_USER_FAIL ) ;
278298>>> >>> > feat : TT - 188 add ngrx flow & test
279299=== === =
280300 expect ( action . type ) . toEqual ( UserActionTypes . REMOVE_USER_TO_GROUP_FAIL ) ;
281301>>> >>> > refactor : TT - 188 refactor some names
302+ === === =
303+ expect ( action . type ) . toEqual ( UserActionTypes . REMOVE_USER_FROM_GROUP_FAIL ) ;
304+ >>> >>> > refactor : TT - 188 refactor 'removeTo ' to 'removeFrom ' references
282305 } ) ;
283306 } ) ;
284307} ) ;
0 commit comments