Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't rely on hardcoded IDs in DataListTest (breaks postgres)

  • Loading branch information...
commit 99b1bc672b2dff2c3b96e75d0df0a531bce18e09 1 parent d5313aa
@chillu chillu authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tests/model/DataListTest.php
View
3  tests/model/DataListTest.php
@@ -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');
Please sign in to comment.
Something went wrong with that request. Please try again.