From 12a8db714bdf5db177741a8d3a0f0e44b3bbc2ad Mon Sep 17 00:00:00 2001 From: Cleverson Sacramento Date: Wed, 17 Sep 2014 15:55:08 -0300 Subject: [PATCH] FWK-185: Falha nos testes insertFailed() updateFailed() do arquétipo demoiselle-html-rest --- archetype/html-rest/src/main/resources/archetype-resources/src/test/java/rest/BookmarkRESTTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/archetype/html-rest/src/main/resources/archetype-resources/src/test/java/rest/BookmarkRESTTest.java b/archetype/html-rest/src/main/resources/archetype-resources/src/test/java/rest/BookmarkRESTTest.java index 28612bd..2153d03 100644 --- a/archetype/html-rest/src/main/resources/archetype-resources/src/test/java/rest/BookmarkRESTTest.java +++ b/archetype/html-rest/src/main/resources/archetype-resources/src/test/java/rest/BookmarkRESTTest.java @@ -4,7 +4,6 @@ import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST; import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT; import static javax.servlet.http.HttpServletResponse.SC_OK; -import static javax.servlet.http.HttpServletResponse.SC_PRECONDITION_FAILED; import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -190,7 +189,7 @@ public class BookmarkRESTTest { request.addHeader("Authorization", BASIC_CREDENTIALS); response = client.execute(request); response.close(); - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); + assertEquals(422, response.getStatusLine().getStatusCode()); violations = mapper.readValue(response.getEntity().getContent(), new TypeReference>() { }); @@ -208,7 +207,7 @@ public class BookmarkRESTTest { request.addHeader("Authorization", BASIC_CREDENTIALS); response = client.execute(request); response.close(); - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); + assertEquals(422, response.getStatusLine().getStatusCode()); violations = mapper.readValue(response.getEntity().getContent(), new TypeReference>() { }); @@ -287,7 +286,7 @@ public class BookmarkRESTTest { request.addHeader("Authorization", BASIC_CREDENTIALS); response = client.execute(request); response.close(); - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); + assertEquals(422, response.getStatusLine().getStatusCode()); violations = mapper.readValue(response.getEntity().getContent(), new TypeReference>() { }); @@ -305,7 +304,7 @@ public class BookmarkRESTTest { request.addHeader("Authorization", BASIC_CREDENTIALS); response = client.execute(request); response.close(); - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); + assertEquals(422, response.getStatusLine().getStatusCode()); violations = mapper.readValue(response.getEntity().getContent(), new TypeReference>() { }); -- libgit2 0.21.2