Permalink
Browse files

Adding tests for absolute urls on script elements.

  • Loading branch information...
1 parent f140080 commit 9602de8f88a8d35f0cb27c7121133c571c79a319 @markstory markstory committed Jul 26, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 cake/tests/cases/libs/view/helpers/html.test.php
@@ -592,6 +592,12 @@ function testScript() {
);
$this->assertTags($result, $expected);
+ $result = $this->Html->script('http://example.com/test.json');
+ $expected = array(
+ 'script' => array('type' => 'text/javascript', 'src' => 'http://example.com/test.json.js')
+ );
+ $this->assertTags($result, $expected);
+
$result = $this->Html->script('/plugin/js/jquery-1.3.2.js?someparam=foo');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => '/plugin/js/jquery-1.3.2.js?someparam=foo')

0 comments on commit 9602de8

Please sign in to comment.