From ab68cde7e9de4f2e900cf73f2377d6ea1204b8f3 Mon Sep 17 00:00:00 2001 From: peggy Date: Mon, 30 Sep 2019 16:59:23 -0700 Subject: [PATCH] update --- .../autoconfigure/plugins/http/DocumentInterceptorTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jrcc-access-spring-boot-autoconfigure/src/test/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/http/DocumentInterceptorTests.java b/jrcc-access-spring-boot-autoconfigure/src/test/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/http/DocumentInterceptorTests.java index d122f6cc..5a5dc77b 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/test/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/http/DocumentInterceptorTests.java +++ b/jrcc-access-spring-boot-autoconfigure/src/test/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/http/DocumentInterceptorTests.java @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; import static org.junit.Assert.*; +import static org.mockito.Mockito.verify; public class DocumentInterceptorTests { @@ -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