File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -170,34 +170,6 @@ describe("Users Page", () => {
170
170
} )
171
171
172
172
describe ( "suspend user" , ( ) => {
173
- describe ( "when it is success" , ( ) => {
174
- it ( "shows a success message and refresh the page" , async ( ) => {
175
- render (
176
- < >
177
- < UsersPage />
178
- < GlobalSnackbar />
179
- </ > ,
180
- )
181
-
182
- await suspendUser ( ( ) => {
183
- jest . spyOn ( API , "suspendUser" ) . mockResolvedValueOnce ( MockUser )
184
- jest
185
- . spyOn ( API , "getUsers" )
186
- . mockImplementationOnce ( ( ) => Promise . resolve ( [ MockUser , MockUser2 ] ) )
187
- } )
188
-
189
- // Check if the success message is displayed
190
- await screen . findByText ( usersXServiceLanguage . suspendUserSuccess )
191
-
192
- // Check if the API was called correctly
193
- expect ( API . suspendUser ) . toBeCalledTimes ( 1 )
194
- expect ( API . suspendUser ) . toBeCalledWith ( MockUser . id )
195
-
196
- // Check if the users list was reload
197
- await waitFor ( ( ) => expect ( API . getUsers ) . toBeCalledTimes ( 1 ) )
198
- } )
199
- } )
200
-
201
173
describe ( "when it fails" , ( ) => {
202
174
it ( "shows an error message" , async ( ) => {
203
175
render (
You can’t perform that action at this time.
0 commit comments