DATAREST-902 - Fixed order depending DuplicateLinkListingTest.

We now use the explicit identifier of the person just created, not a fixed 1 as other tests might have used that identifier already and that entity is not available anymore as a transaction rollback occured in those tests.
This commit is contained in:
Oliver Gierke
2016-09-20 07:46:10 +02:00
parent ec95f9e14f
commit 2bed28842d

View File

@@ -93,7 +93,8 @@ public class DuplicateLinkListingTests {
@Test
public void testBasics() throws Exception {
ResultActions frodoActions = testMvcClient.follow("/people/1");
Person person = personRepository.findAll().iterator().next();
ResultActions frodoActions = testMvcClient.follow("/people/" + person.getId());
frodoActions.andExpect(jsonPath("$.links").value(hasSize(4)));
}