test/unit_test.rb in sinatra-assetpack-0.1.2 vs test/unit_test.rb in sinatra-assetpack-0.1.3

- old
+ new

@@ -47,10 +47,15 @@ test 'wrong extension for dynamic coffeescript file' do get '/js/hi.css' assert last_response.status == 404 end + test 'returns file of requested type when mixed type assets of varying extension are present' do + get '/packages/a_package.010101.js' + assert body.include? 'function(){alert("Hello");' + end + test 'static css' do get '/css/style.css' assert body.include?('div { color: red; }') end @@ -75,13 +80,12 @@ app.expects(:production?).returns(true) get '/index.html' assert body =~ /<script src='\/js\/app.[0-9]+.js'><\/script>/ end - test "compressed js" do - get '/js/app.js' - assert body.include? 'function(){alert("Hello");' - assert_includes body, "var x;x=function(){" + test "file with multiple dots in name" do + get '/js/jquery-1.8.0.min.js' + assert body.include? '$(function() { alert("Hello"); });' end test "compressed js with cache bust" do get '/js/app.38987.js' assert body.include? 'function(){alert("Hello");'