@@ -125,35 +125,35 @@ describe('userReducer', () => {
125125 expect ( state . isLoading ) . toEqual ( false ) ;
126126 } ) ;
127127
128- it ( 'on RemoveUserToGroup , isLoading is true' , ( ) => {
128+ it ( 'on RemoveUserFromGroup , isLoading is true' , ( ) => {
129129 const userId = 'userId' ;
130130 const groupName = 'groupName' ;
131- const action = new actions . RemoveUserToGroup ( userId , groupName ) ;
131+ const action = new actions . RemoveUserFromGroup ( userId , groupName ) ;
132132 const state = userReducer ( initialState , action ) ;
133133
134134 expect ( state . isLoading ) . toEqual ( true ) ;
135135 } ) ;
136136
137- it ( 'on RemoveUserToGroupSuccess , user groups should change' , ( ) => {
137+ it ( 'on RemoveUserFromGroupSuccess , user groups should change' , ( ) => {
138138 const currentState : UserState = {
139139 data : [ { id : 'id' , name : 'name' , email : 'email' , groups : [ 'group' ] } ] ,
140140 isLoading : false ,
141141 message : '' ,
142142 } ;
143143 const userWithGroupRemoved : User = { id : 'id' , name : 'name' , email : 'email' , groups : null } ;
144- const action = new actions . RemoveUserToGroupSuccess ( userWithGroupRemoved ) ;
144+ const action = new actions . RemoveUserFromGroupSuccess ( userWithGroupRemoved ) ;
145145 const state = userReducer ( currentState , action ) ;
146146
147147 expect ( state . data ) . toEqual ( [ userWithGroupRemoved ] ) ;
148148 expect ( state . isLoading ) . toEqual ( false ) ;
149- expect ( state . message ) . toEqual ( 'Remove user to group success' ) ;
149+ expect ( state . message ) . toEqual ( 'Remove user from group success' ) ;
150150 } ) ;
151151
152- it ( 'on RemoveUserToGroupFail , should show a message with an error message' , ( ) => {
153- const action = new actions . RemoveUserToGroupFail ( 'error' ) ;
152+ it ( 'on RemoveUserFromGroupFail , should show a message with an error message' , ( ) => {
153+ const action = new actions . RemoveUserFromGroupFail ( 'error' ) ;
154154 const state = userReducer ( initialState , action ) ;
155155
156- expect ( state . message ) . toEqual ( 'Something went wrong removing user to group' ) ;
156+ expect ( state . message ) . toEqual ( 'Something went wrong removing user from group' ) ;
157157 expect ( state . isLoading ) . toEqual ( false ) ;
158158 } ) ;
159159
0 commit comments