Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue 23 where GridFieldSortableRowsTest would fail because the…

… name of the request variable changed from Items to ItemIDs
  • Loading branch information...
commit d4e8ba68e909f9d041f50164bf8d9067cc120980 1 parent ee001c3
@UndefinedOffset authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/forms/GridFieldSortableRowsTest.php
View
4 tests/forms/GridFieldSortableRowsTest.php
@@ -30,7 +30,7 @@ public function testSortActionWithoutCorrectPermission() {
$stateID = 'testGridStateActionField';
Session::set($stateID, array('grid'=>'', 'actionName'=>'saveGridRowSort', 'args'=>array('GridFieldSortableRows'=>array('sortableToggle'=>true))));
- $request = new SS_HTTPRequest('POST', 'url', array('Items'=>'1,3,2'), array('action_gridFieldAlterAction?StateID='.$stateID=>true));
+ $request = new SS_HTTPRequest('POST', 'url', array('ItemIDs'=>'1,3,2'), array('action_gridFieldAlterAction?StateID='.$stateID=>true));
$this->gridField->gridFieldAlterAction(array('StateID'=>$stateID), $this->form, $request);
$this->assertEquals(3, $this->list->last()->ID, 'User should\'t be able to sort records without correct permissions.');
}
@@ -39,7 +39,7 @@ public function testSortActionWithAdminPermission() {
$this->logInWithPermission('ADMIN');
$stateID = 'testGridStateActionField';
Session::set($stateID, array('grid'=>'', 'actionName'=>'saveGridRowSort', 'args'=>array('GridFieldSortableRows'=>array('sortableToggle'=>true))));
- $request = new SS_HTTPRequest('POST', 'url', array('Items'=>'1,3,2'), array('action_gridFieldAlterAction?StateID='.$stateID=>true));
+ $request = new SS_HTTPRequest('POST', 'url', array('ItemIDs'=>'1,3,2'), array('action_gridFieldAlterAction?StateID='.$stateID=>true));
$this->gridField->gridFieldAlterAction(array('StateID'=>$stateID), $this->form, $request);
$this->assertEquals(2, $this->list->last()->ID, 'User should be able to sort records with ADMIN permission.');
}
Please sign in to comment.
Something went wrong with that request. Please try again.