aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorThomas Fuchs <thomas@fesch.at>2005-09-28 08:20:47 +0000
committerThomas Fuchs <thomas@fesch.at>2005-09-28 08:20:47 +0000
commit516dc2c0f16cf187f981b5e8648a7f7f1b31d190 (patch)
treed645e19a02ab5eb371302fe4742b7fd7e0a1a1e2 /actionpack/test
parentdd21e9ae39a2dc4b7eb607ff2c200c864fa19b28 (diff)
downloadrails-516dc2c0f16cf187f981b5e8648a7f7f1b31d190.tar.gz
rails-516dc2c0f16cf187f981b5e8648a7f7f1b31d190.tar.bz2
rails-516dc2c0f16cf187f981b5e8648a7f7f1b31d190.zip
Update script.aculo.us to 1.5_rc2, and Prototype to 1.4.0_pre7
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb4
-rw-r--r--actionpack/test/template/java_script_macros_helper_test.rb2
-rw-r--r--actionpack/test/template/javascript_helper_test.rb3
3 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 7fbe98f250..d5ea05bf37 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require File.dirname(__FILE__) + '/../../lib/action_view/helpers/asset_tag_helper'
+require File.dirname(__FILE__) + '/../abstract_unit'
class AssetTagHelperTest < Test::Unit::TestCase
include ActionView::Helpers::TagHelper
@@ -144,6 +143,7 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
JavascriptIncludeToTag = {
%(javascript_include_tag("xmlhr")) => %(<script src="/calloboration/hieraki/javascripts/xmlhr.js" type="text/javascript"></script>),
%(javascript_include_tag("common.javascript", "/elsewhere/cools")) => %(<script src="/calloboration/hieraki/javascripts/common.javascript" type="text/javascript"></script>\n<script src="/calloboration/hieraki/elsewhere/cools.js" type="text/javascript"></script>),
+ %(javascript_include_tag(:defaults)) => %(<script src='/calloboration/hieraki/javascripts/prototype.js' type='text/javascript'></script>\n<script src='/calloboration/hieraki/javascripts/scriptaculous.js' type='text/javascript'></script>),
}
StylePathToTag = {
diff --git a/actionpack/test/template/java_script_macros_helper_test.rb b/actionpack/test/template/java_script_macros_helper_test.rb
index 5b305eb5ee..9f1b6181c5 100644
--- a/actionpack/test/template/java_script_macros_helper_test.rb
+++ b/actionpack/test/template/java_script_macros_helper_test.rb
@@ -46,7 +46,7 @@ class JavaScriptMacrosHelperTest < Test::Unit::TestCase
def test_text_field_with_auto_complete
assert_match "<style>",
text_field_with_auto_complete(:message, :recipient)
- assert_dom_equal %(<input autocomplete=\"off\" id=\"message_recipient\" name=\"message[recipient]\" size=\"30\" type=\"text\" /><div class=\"auto_complete\" id=\"message_recipient_auto_complete\"></div><script type=\"text/javascript\">new Ajax.Autocompleter('message_recipient', 'message_recipient_auto_complete', 'http://www.example.com/auto_complete_for_message_recipient', {})</script>),
+ assert_dom_equal %(<input id=\"message_recipient\" name=\"message[recipient]\" size=\"30\" type=\"text\" /><div class=\"auto_complete\" id=\"message_recipient_auto_complete\"></div><script type=\"text/javascript\">new Ajax.Autocompleter('message_recipient', 'message_recipient_auto_complete', 'http://www.example.com/auto_complete_for_message_recipient', {})</script>),
text_field_with_auto_complete(:message, :recipient, {}, :skip_style => true)
end
end
diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb
index 63c364bd1d..caafe5387b 100644
--- a/actionpack/test/template/javascript_helper_test.rb
+++ b/actionpack/test/template/javascript_helper_test.rb
@@ -23,6 +23,9 @@ class JavaScriptHelperTest < Test::Unit::TestCase
def test_define_javascript_functions
# check if prototype.js is included first
assert_not_nil define_javascript_functions.split("\n")[1].match(/Prototype JavaScript framework/)
+
+ # check that scriptaculous.js is not in here, only needed if loaded remotely
+ assert_nil define_javascript_functions.split("\n")[1].match(/var Scriptaculous = \{/)
end
def test_escape_javascript