Skip to content

Commit

Permalink
Don't rely on hardcoded IDs in DataListTest (breaks postgres)
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Sep 12, 2012
1 parent d5313aa commit 99b1bc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/model/DataListTest.php
Expand Up @@ -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');
Expand Down

0 comments on commit 99b1bc6

Please sign in to comment.