@@ -231,14 +231,14 @@ public void testLaunchFlowWithDefinitionRedirect() throws Exception {
231231 @ Test
232232 public void testLaunchFlowWithExternalHttpRedirect () throws Exception {
233233 setupRequest ("/springtravel" , "/app" , "/foo" , "GET" );
234- context .requestExternalRedirect ("https ://www.paypal.com" );
234+ context .requestExternalRedirect ("http ://www.paypal.com" );
235235 flowExecutor .launchExecution ("foo" , flowInput , context );
236236 FlowExecutionResult result = FlowExecutionResult .createPausedResult ("foo" , "12345" );
237237 EasyMock .expectLastCall ().andReturn (result );
238238 EasyMock .replay (flowExecutor );
239239 flowHandlerAdapter .handle (request , response , flowHandler );
240240 EasyMock .verify (flowExecutor );
241- assertEquals ("https ://www.paypal.com" , response .getRedirectedUrl ());
241+ assertEquals ("http ://www.paypal.com" , response .getRedirectedUrl ());
242242 EasyMock .verify (flowExecutor );
243243 }
244244
@@ -256,6 +256,48 @@ public void testLaunchFlowWithExternalHttpsRedirect() throws Exception {
256256 EasyMock .verify (flowExecutor );
257257 }
258258
259+ @ Test
260+ public void testLaunchFlowWithExternalMailtoRedirect () throws Exception {
261+ setupRequest ("/springtravel" , "/app" , "/foo" , "GET" );
262+ context .requestExternalRedirect ("mailto:help@mail.test" );
263+ flowExecutor .launchExecution ("foo" , flowInput , context );
264+ FlowExecutionResult result = FlowExecutionResult .createPausedResult ("foo" , "12345" );
265+ EasyMock .expectLastCall ().andReturn (result );
266+ EasyMock .replay (flowExecutor );
267+ flowHandlerAdapter .handle (request , response , flowHandler );
268+ EasyMock .verify (flowExecutor );
269+ assertEquals ("mailto:help@mail.test" , response .getRedirectedUrl ());
270+ EasyMock .verify (flowExecutor );
271+ }
272+
273+ @ Test
274+ public void testLaunchFlowWithExternalTelRedirect () throws Exception {
275+ setupRequest ("/springtravel" , "/app" , "/foo" , "GET" );
276+ context .requestExternalRedirect ("tel:+1.800.555.1212" );
277+ flowExecutor .launchExecution ("foo" , flowInput , context );
278+ FlowExecutionResult result = FlowExecutionResult .createPausedResult ("foo" , "12345" );
279+ EasyMock .expectLastCall ().andReturn (result );
280+ EasyMock .replay (flowExecutor );
281+ flowHandlerAdapter .handle (request , response , flowHandler );
282+ EasyMock .verify (flowExecutor );
283+ assertEquals ("tel:+1.800.555.1212" , response .getRedirectedUrl ());
284+ EasyMock .verify (flowExecutor );
285+ }
286+
287+ @ Test
288+ public void testLaunchFlowWithExternalCustomSchemeRedirect () throws Exception {
289+ setupRequest ("/springtravel" , "/app" , "/foo" , "GET" );
290+ context .requestExternalRedirect ("my-mobile-app://redirect/target/path" );
291+ flowExecutor .launchExecution ("foo" , flowInput , context );
292+ FlowExecutionResult result = FlowExecutionResult .createPausedResult ("foo" , "12345" );
293+ EasyMock .expectLastCall ().andReturn (result );
294+ EasyMock .replay (flowExecutor );
295+ flowHandlerAdapter .handle (request , response , flowHandler );
296+ EasyMock .verify (flowExecutor );
297+ assertEquals ("my-mobile-app://redirect/target/path" , response .getRedirectedUrl ());
298+ EasyMock .verify (flowExecutor );
299+ }
300+
259301 @ Test
260302 public void testLaunchFlowWithExternalRedirectServletRelative () throws Exception {
261303 setupRequest ("/springtravel" , "/app" , "/foo" , "GET" );
0 commit comments