Sha256: a4f113e8dace59bc6ad4b6f11340a72f94d70d80750fe947540ac2ed5963842d

Contents?: true

Size: 1.19 KB

Versions: 4

Compression:

Stored size: 1.19 KB

Contents

# encoding: utf-8
require File.expand_path("test/test_helper.rb")

module ThemesForRails
  class RoutingTest < ::ActionController::TestCase  
    should "recognize stylesheets route" do
      assert_generates('/themes/default/stylesheets/app.css', { 
        :controller => 'themes_for_rails/assets', 
        :action => 'stylesheets',
        :theme => 'default', 
        :asset => 'app.css'
      })
    end
    should "recognize javascripts route" do
      assert_generates('/themes/default/javascripts/app.js', { 
        :controller => 'themes_for_rails/assets', 
        :action => 'javascripts',
        :theme => 'default', 
        :asset => 'app.js'
      })
    end
    should "recognize images route" do
      assert_generates('/themes/default/images/logo.png', { 
        :controller => 'themes_for_rails/assets', 
        :action => 'images',
        :theme => 'default', 
        :asset => 'logo.png'
      })
    end
    
    should "recognize nested route" do
      assert_generates('/themes/default/images/nested/logo.png', { 
        :controller => 'themes_for_rails/assets', 
        :action => 'images',
        :theme => 'default', 
        :asset => 'nested/logo.png'
      })
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
themes_for_rails4-1.5.1 test/lib/routes_test.rb
themes_for_rails-0.5.1 test/lib/routes_test.rb
themes_for_rails-0.5.0 test/lib/routes_test.rb
themes_for_rails-0.5.0.pre test/lib/routes_test.rb