Commit 12a8db714bdf5db177741a8d3a0f0e44b3bbc2ad
1 parent
54d0eefd
Exists in
master
FWK-185: Falha nos testes insertFailed() updateFailed() do arquétipo
demoiselle-html-rest Task-Url: https://demoiselle.atlassian.net/browse/FWK-185
Showing
1 changed file
with
4 additions
and
5 deletions
Show diff stats
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; |
4 | 4 | import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; |
5 | 5 | import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT; |
6 | 6 | import static javax.servlet.http.HttpServletResponse.SC_OK; |
7 | -import static javax.servlet.http.HttpServletResponse.SC_PRECONDITION_FAILED; | |
8 | 7 | import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; |
9 | 8 | import static org.junit.Assert.assertEquals; |
10 | 9 | import static org.junit.Assert.assertNotNull; |
... | ... | @@ -190,7 +189,7 @@ public class BookmarkRESTTest { |
190 | 189 | request.addHeader("Authorization", BASIC_CREDENTIALS); |
191 | 190 | response = client.execute(request); |
192 | 191 | response.close(); |
193 | - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); | |
192 | + assertEquals(422, response.getStatusLine().getStatusCode()); | |
194 | 193 | violations = mapper.readValue(response.getEntity().getContent(), |
195 | 194 | new TypeReference<Set<UnprocessableEntityException.Violation>>() { |
196 | 195 | }); |
... | ... | @@ -208,7 +207,7 @@ public class BookmarkRESTTest { |
208 | 207 | request.addHeader("Authorization", BASIC_CREDENTIALS); |
209 | 208 | response = client.execute(request); |
210 | 209 | response.close(); |
211 | - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); | |
210 | + assertEquals(422, response.getStatusLine().getStatusCode()); | |
212 | 211 | violations = mapper.readValue(response.getEntity().getContent(), |
213 | 212 | new TypeReference<Set<UnprocessableEntityException.Violation>>() { |
214 | 213 | }); |
... | ... | @@ -287,7 +286,7 @@ public class BookmarkRESTTest { |
287 | 286 | request.addHeader("Authorization", BASIC_CREDENTIALS); |
288 | 287 | response = client.execute(request); |
289 | 288 | response.close(); |
290 | - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); | |
289 | + assertEquals(422, response.getStatusLine().getStatusCode()); | |
291 | 290 | violations = mapper.readValue(response.getEntity().getContent(), |
292 | 291 | new TypeReference<Set<UnprocessableEntityException.Violation>>() { |
293 | 292 | }); |
... | ... | @@ -305,7 +304,7 @@ public class BookmarkRESTTest { |
305 | 304 | request.addHeader("Authorization", BASIC_CREDENTIALS); |
306 | 305 | response = client.execute(request); |
307 | 306 | response.close(); |
308 | - assertEquals(SC_PRECONDITION_FAILED, response.getStatusLine().getStatusCode()); | |
307 | + assertEquals(422, response.getStatusLine().getStatusCode()); | |
309 | 308 | violations = mapper.readValue(response.getEntity().getContent(), |
310 | 309 | new TypeReference<Set<UnprocessableEntityException.Violation>>() { |
311 | 310 | }); | ... | ... |