Browse files

BUGFIX: Removed assumption in GridFieldDataColumnsTest that Member wo…

…uld always have the same summary fields.
  • Loading branch information...
1 parent 6350f30 commit ee53df336db3cf453f340834895680ca951bdd6d @robert-h-curry robert-h-curry committed Apr 20, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 tests/forms/gridfield/GridFieldDataColumnsTest.php
View
6 tests/forms/gridfield/GridFieldDataColumnsTest.php
@@ -6,11 +6,7 @@ class GridFieldDataColumnsTest extends SapphireTest {
*/
public function testGridFieldGetDefaultDisplayFields() {
$obj = new GridField('testfield', 'testfield', DataList::create('Member'));
- $expected = array(
- 'FirstName' => 'First Name',
- 'Surname' => 'Last Name',
- 'Email' => 'Email',
- );
+ $expected = singleton('Member')->summaryFields();
$columns = $obj->getConfig()->getComponentByType('GridFieldDataColumns');
$this->assertEquals($expected, $columns->getDisplayFields($obj));
}

0 comments on commit ee53df3

Please sign in to comment.