Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
peggy-gov-bc-ca committed Sep 30, 2019
1 parent 23b1c3f commit ab68cde
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.servlet.http.HttpServletResponse;

import static org.junit.Assert.*;
import static org.mockito.Mockito.verify;

public class DocumentInterceptorTests {

Expand Down Expand Up @@ -41,6 +42,7 @@ public void http_request_no_file_should_reture_bad_request() throws Exception{
MultipartHttpServletRequest badRequest = Mockito.mock(MultipartHttpServletRequest.class);
Mockito.when(badRequest.getFile("file")).thenReturn(null);
assertFalse(interceptor.preHandle(badRequest, response, o ) );
verify(response).sendError(HttpServletResponse.SC_BAD_REQUEST,"Expecting file in the request." );
}

@Test
Expand Down

0 comments on commit ab68cde

Please sign in to comment.