Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 99b1bc672b2dff2c3b96e75d0df0a531bce18e09 1 parent d5313aa
Ingo Schommer authored September 12, 2012

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  tests/model/DataListTest.php
3  tests/model/DataListTest.php
@@ -19,7 +19,8 @@ class DataListTest extends SapphireTest {
19 19
 	);
20 20
 	
21 21
 	public function testSubtract(){
22  
-		$subtractList = DataObjectTest_TeamComment::get()->filter('ID', 1);
  22
+		$comment1 = $this->objFromFixture('DataObjectTest_TeamComment', 'comment1');
  23
+		$subtractList = DataObjectTest_TeamComment::get()->filter('ID', $comment1->ID);
23 24
 		$fullList = DataObjectTest_TeamComment::get();
24 25
 		$newList = $fullList->subtract($subtractList);
25 26
 		$this->assertEquals(2, $newList->Count(), 'List should only contain two objects after subtraction');

0 notes on commit 99b1bc6

Please sign in to comment.
Something went wrong with that request. Please try again.