mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Don't rely on hardcoded IDs in DataListTest (breaks postgres)
This commit is contained in:
parent
d5313aa6a4
commit
99b1bc672b
@ -19,7 +19,8 @@ class DataListTest extends SapphireTest {
|
||||
);
|
||||
|
||||
public function testSubtract(){
|
||||
$subtractList = DataObjectTest_TeamComment::get()->filter('ID', 1);
|
||||
$comment1 = $this->objFromFixture('DataObjectTest_TeamComment', 'comment1');
|
||||
$subtractList = DataObjectTest_TeamComment::get()->filter('ID', $comment1->ID);
|
||||
$fullList = DataObjectTest_TeamComment::get();
|
||||
$newList = $fullList->subtract($subtractList);
|
||||
$this->assertEquals(2, $newList->Count(), 'List should only contain two objects after subtraction');
|
||||
|
Loading…
Reference in New Issue
Block a user