Sha256: 3a162693beaa197a402485e7cc10eb73e061a8e59e3e9d8de7da5517d2bd1121

Contents?: true

Size: 1.43 KB

Versions: 1

Compression:

Stored size: 1.43 KB

Contents

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

class AppTest < UnitTest
  test 'htc' do
    get '/css/behavior.htc'
    assert last_response.content_type =~ %r[^text/x-component]
  end

  test 'css - sass' do
    get '/css/screen.css'
    assert last_response.content_type =~ %r[^text/css]
  end

  test 'js' do
    get '/js/hello.js'
    assert last_response.content_type =~ %r[^.*?/javascript]
  end

  test 'js - coffee' do
    get '/js/hi.js'
    assert last_response.content_type =~ %r[^.*?/javascript]
  end

  test 'css - compressed' do
    get '/css/application.css'
    assert last_response.content_type =~ %r[^text/css]
  end

  test 'js - compressed' do
    get '/skitch.js'
    assert last_response.content_type =~ %r[^.*?/javascript]
  end

  test 'eot' do
    get '/fonts/cantarell-regular-webfont.eot'
    assert last_response.content_type =~ %r[^application/vnd.ms-fontobject]
  end

  test 'svg' do
    get '/fonts/cantarell-regular-webfont.svg'
    assert last_response.content_type =~ %r[^image/svg\+xml]
  end

  test 'ttf' do
    get '/fonts/cantarell-regular-webfont.ttf'
    assert last_response.content_type =~ %r[^application/octet-stream]
  end

  test 'woff' do
    get '/fonts/cantarell-regular-webfont.woff'
    assert last_response.content_type =~ %r[^application/font-woff]
  end
  
  test 'woff2' do
    get '/fonts/cantarell-regular-webfont.woff2'
    assert last_response.content_type =~ %r[^application/font-woff2]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-assetpack-0.3.5 test/mime_type_test.rb