From 454d9716d2fdcfb3e9d817c0f157e76dbd51c74d Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 6 Feb 2007 14:23:36 +0000 Subject: [PATCH] Adding AjaxHelper tests git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4458 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/view/helpers/ajax.test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cake/tests/cases/libs/view/helpers/ajax.test.php b/cake/tests/cases/libs/view/helpers/ajax.test.php index 0ce116a6d..26ff6c68d 100644 --- a/cake/tests/cases/libs/view/helpers/ajax.test.php +++ b/cake/tests/cases/libs/view/helpers/ajax.test.php @@ -47,6 +47,18 @@ class AjaxTest extends UnitTestCase { $this->ajax->Javascript = new JavascriptHelper(); } + function testEvalScripts() { + $result = $this->ajax->link('Test Link', '/', array('id' => 'link1', 'update' => 'content', 'evalScripts' => false)); + $expected = 'Test Link'; + $this->assertEqual($result, $expected); + } + + function testAsynchronous() { + $result = $this->ajax->link('Test Link', '/', array('id' => 'link1', 'update' => 'content', 'type' => 'synchronous')); + $expected = 'Test Link'; + $this->assertEqual($result, $expected); + } + function testDraggable() { $result = $this->ajax->drag('id', array('handle' => 'other_id')); $expected = '';