aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/sprockets_helper_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-05-22 20:11:36 -0500
committerJoshua Peek <josh@joshpeek.com>2011-05-22 20:11:36 -0500
commit5e519fb0150e6ccb7e2486fc8aa2d60d11b53b75 (patch)
treedfadca323c6488c167d434e607caaf96c75c8a5c /actionpack/test/template/sprockets_helper_test.rb
parentba3ea9c90b000d8520944b51b2f6d41af148090c (diff)
parent7ad24a7d962be62fc7538e8a9dc1046daf896497 (diff)
downloadrails-5e519fb0150e6ccb7e2486fc8aa2d60d11b53b75.tar.gz
rails-5e519fb0150e6ccb7e2486fc8aa2d60d11b53b75.tar.bz2
rails-5e519fb0150e6ccb7e2486fc8aa2d60d11b53b75.zip
Merge branch '3-1-stable'
Conflicts: actionpack/actionpack.gemspec activemodel/activemodel.gemspec
Diffstat (limited to 'actionpack/test/template/sprockets_helper_test.rb')
-rw-r--r--actionpack/test/template/sprockets_helper_test.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb
index 47c2787502..23288a242c 100644
--- a/actionpack/test/template/sprockets_helper_test.rb
+++ b/actionpack/test/template/sprockets_helper_test.rb
@@ -18,6 +18,7 @@ class SprocketsHelperTest < ActionView::TestCase
super
@controller = BasicController.new
+ @controller.stubs(:params).returns({})
@request = Class.new do
def protocol() 'http://' end
@@ -90,10 +91,13 @@ class SprocketsHelperTest < ActionView::TestCase
sprockets_javascript_include_tag("xmlhr.js")
assert_equal '<script src="http://www.example.com/xmlhr" type="text/javascript"></script>',
sprockets_javascript_include_tag("http://www.example.com/xmlhr")
+
+ assert_equal "<script src=\"/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js?body=1\" type=\"text/javascript\"></script>\n<script src=\"/assets/application-d41d8cd98f00b204e9800998ecf8427e.js?body=1\" type=\"text/javascript\"></script>",
+ sprockets_javascript_include_tag(:application, :debug => true)
end
test "stylesheet path" do
- assert_equal "/assets/application-d41d8cd98f00b204e9800998ecf8427e.css", asset_path(:application, "css")
+ assert_equal "/assets/application-68b329da9893e34099c7d8ad5cb9c940.css", asset_path(:application, "css")
assert_equal "/assets/style-d41d8cd98f00b204e9800998ecf8427e.css", asset_path("style", "css")
assert_equal "/assets/dir/style-d41d8cd98f00b204e9800998ecf8427e.css", asset_path("dir/style.css", "css")
@@ -106,7 +110,7 @@ class SprocketsHelperTest < ActionView::TestCase
end
test "stylesheet link tag" do
- assert_equal '<link href="/assets/application-d41d8cd98f00b204e9800998ecf8427e.css" media="screen" rel="stylesheet" type="text/css" />',
+ assert_equal '<link href="/assets/application-68b329da9893e34099c7d8ad5cb9c940.css" media="screen" rel="stylesheet" type="text/css" />',
sprockets_stylesheet_link_tag(:application)
assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="screen" rel="stylesheet" type="text/css" />',
@@ -120,5 +124,8 @@ class SprocketsHelperTest < ActionView::TestCase
sprockets_stylesheet_link_tag("style", :media => "all")
assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="print" rel="stylesheet" type="text/css" />',
sprockets_stylesheet_link_tag("style", :media => "print")
+
+ assert_equal "<link href=\"/assets/style-d41d8cd98f00b204e9800998ecf8427e.css?body=1\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"/assets/application-68b329da9893e34099c7d8ad5cb9c940.css?body=1\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />",
+ sprockets_stylesheet_link_tag(:application, :debug => true)
end
end