Permalink
Browse files

Adding buffer flush to ajax helper test. Test suite menus now properl…

…y display.

Fixing Drag options.  Adding test coverage. Fixes #6266

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8135 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent d74e2d1 commit 5c4f838f5a5ed71d56daf6bb5779ce00161ba379 @markstory markstory committed Apr 6, 2009
Showing with 7 additions and 1 deletion.
  1. +2 −1 cake/libs/view/helpers/ajax.php
  2. +5 −0 cake/tests/cases/libs/view/helpers/ajax.test.php
@@ -81,7 +81,8 @@ class AjaxHelper extends AppHelper {
*/
var $dragOptions = array(
'handle', 'revert', 'snap', 'zindex', 'constraint', 'change', 'ghosting',
- 'starteffect', 'reverteffect', 'endeffect'
+ 'starteffect', 'reverteffect', 'endeffect', 'scroll', 'scrollSensitivity',
+ 'onStart', 'onDrag', 'onDropped' , 'onEnd'
);
/**
* Options for droppable.
@@ -300,6 +300,10 @@ function testDraggable() {
'/script'
);
$this->assertTags($result, $expected);
+
+ $result = $this->Ajax->drag('id', array('onDrag' => 'doDrag', 'onDropped' => 'doDrop'));
+ $this->assertPattern('/onDrag:doDrag/', $result);
+ $this->assertPattern('/onDropped:doDrop/', $result);
}
/**
* testDroppable method
@@ -795,6 +799,7 @@ function testRemoteFunction() {
* @return void
*/
function testDiv() {
+ ob_flush();
$oldXUpdate = env('HTTP_X_UPDATE');
$result = $this->Ajax->div('myDiv');

0 comments on commit 5c4f838

Please sign in to comment.