Skip to content
Permalink
Browse files

Adding tests for dataExpression to mootools engine.

  • Loading branch information...
markstory committed Jul 25, 2009
1 parent 6f10f5d commit ed10374a6f409b728d693d19a2140cf6b2e06bff
Showing with 13 additions and 0 deletions.
  1. +13 −0 cake/tests/cases/libs/view/helpers/mootools_engine.test.php
@@ -191,6 +191,19 @@ function testRequest() {
));
$expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:doComplete, onFailure:doFailure, onRequest:doBefore, onSuccess:doSuccess, update:"update-zone", url:"\\/people\\/edit\\/1"}).send();';
$this->assertEqual($result, $expected);
$result = $this->Moo->request('/people/edit/1', array(
'method' => 'post',
'complete' => 'doComplete',
'success' => 'doSuccess',
'error' => 'doFailure',
'before' => 'doBefore',
'update' => 'update-zone',
'dataExpression' => true,
'data' => '$("foo").toQueryString()'
));
$expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:doComplete, onFailure:doFailure, onRequest:doBefore, onSuccess:doSuccess, update:"update-zone", url:"\\/people\\/edit\\/1"}).send($("foo").toQueryString());';
$this->assertEqual($result, $expected);
}
/**
* test sortable list generation

0 comments on commit ed10374

Please sign in to comment.
You can’t perform that action at this time.