mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
Fix broken test. Don't assume Item of ID=1 exists
This commit is contained in:
@@ -107,7 +107,9 @@ public class ItemTest extends AbstractDSpaceObjectTest
|
||||
@Test
|
||||
public void testItemFind() throws Exception
|
||||
{
|
||||
int id = 1;
|
||||
// Get ID of item created in init()
|
||||
int id = this.it.getID();
|
||||
// Make sure we can find it via its ID
|
||||
Item found = Item.find(context, id);
|
||||
assertThat("testItemFind 0", found, notNullValue());
|
||||
assertThat("testItemFind 1", found.getID(), equalTo(id));
|
||||
@@ -1742,4 +1744,4 @@ public class ItemTest extends AbstractDSpaceObjectTest
|
||||
assertThat("testFindByAuthorityValue 5",result.next(),equalTo(it));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user