From 47ab875a7a4fbbf1039878bea68c0a8de4fee4b6 Mon Sep 17 00:00:00 2001 From: Trever Fischer Date: Mon, 5 Mar 2012 19:18:03 -0500 Subject: [PATCH] Update APIServer test to reflect latest caminus api --- src/test/java/us/camin/APIServer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/us/camin/APIServer.java b/src/test/java/us/camin/APIServer.java index 6fbd086..c43aa5b 100644 --- a/src/test/java/us/camin/APIServer.java +++ b/src/test/java/us/camin/APIServer.java @@ -49,10 +49,12 @@ public class APIServer { private class ValidateServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { resp.setContentType("application/json"); + ServletOutputStream out = resp.getOutputStream(); + if (req.getPathInfo().equals("/TestUser")) - resp.sendError(200); + out.println("{valid: true, error: ''}"); else - resp.sendError(404); + out.println("{valid: false, error: 'Test Failure'}"); } }