Sha256: 3db3f938877d357005a1972bef4108902fcc3b33b1dd65ff12db7c63527f2c27

Contents?: true

Size: 599 Bytes

Versions: 5

Compression:

Stored size: 599 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

class HeadersTest < UnitTest
  setup do
    app.set :reload_templates, true

    @file = File.join(app.root, 'app', 'packages', 'a_package', 'package.js')
    FileUtils.touch(@file)
    @httpdate = File.mtime(@file).httpdate
  end

  test "individual route" do
    get '/packages/a_package/package.js'
    assert_equal @httpdate, last_response.headers['Last-Modified']
  end

  test "package route" do
    get '/packages/a_package.b1946ac92492d2347c6235b4d2611184.js'
    assert_equal @httpdate, last_response.headers['Last-Modified']
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sinatra-assetpack-0.3.0 test/headers_test.rb
sinatra-assetpack-0.2.8 test/headers_test.rb
sinatra-assetpack-0.2.7 test/headers_test.rb
sinatra-assetpack-0.2.6 test/headers_test.rb
sinatra-assetpack-0.2.5 test/headers_test.rb