Browse files

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

  • Loading branch information...
1 parent d5313aa commit 99b1bc672b2dff2c3b96e75d0df0a531bce18e09 @chillu chillu committed Sep 12, 2012
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');

0 comments on commit 99b1bc6

Please sign in to comment.