Skip to content

Commit

Permalink
Add (broken) test case for Padrinos javascript_include_tag helper.
Browse files Browse the repository at this point in the history
Finished tests in 4.508343s, 100.9240 tests/s, 249.0937 assertions/s.

    1) Failure:
    AssetTagHelpers::for #javascript_include_tag method#test_0007_not scramble the query string
    [/home/bascht/Documents/Code/padrino-framework/padrino-helpers/test/test_asset_tag_helper s.rb:300]:
    expected following output to contain a <script src='https://maps.googleapis.com/maps/api/js?key=value&sensor=false'/> tag:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html><head><script
    src="https://maps.googleapis.com/maps/api/js?key=value&amp;sensor=false.js"
    type="text/javascript"></script></head></html>
  • Loading branch information
bascht committed Mar 25, 2013
1 parent c47092d commit 8c57e1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions padrino-helpers/test/test_asset_tag_helpers.rb
Expand Up @@ -294,6 +294,12 @@ def flash
assert_has_tag('script', :src => "/blog/javascripts/application.js?#{time.to_i}", :type => "text/javascript") { actual_html }
end

should "not scramble the query string" do
time = stop_time_for_test
actual_html = javascript_include_tag('https://maps.googleapis.com/maps/api/js?key=value&sensor=false')
assert_has_tag('script', :src => "https://maps.googleapis.com/maps/api/js?key=value&sensor=false") { actual_html }
end

should "display javascript items" do
time = stop_time_for_test
actual_html = javascript_include_tag('application', 'base.js', 'http://google.com/lib.js')
Expand Down

0 comments on commit 8c57e1e

Please sign in to comment.