Sha256: 0ce700d2f4a5887b3fcf7e028a888a14c42e25887f5ed87efa358765e21426e5

Contents?: true

Size: 844 Bytes

Versions: 9

Compression:

Stored size: 844 Bytes

Contents

require File.dirname(__FILE__) + '/../../test_helper'
require 'admin/themes_controller'

# Re-raise errors caught by the controller.
class Admin::ThemesController; def rescue_action(e) raise e end; end

class Admin::ThemesControllerTest < Test::Unit::TestCase
  fixtures :users

  def setup
    @controller = Admin::ThemesController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new

    @request.session = { :user => users(:tobi) }
  end

  # Replace this with your real tests.
  def test_index
    get :index
    assert_response :success
    assert_not_nil assigns(:themes)
  end

  def test_switchto
    get :switchto, :theme => 'azure'
    assert_redirected_to :action => 'index'
  end

  def test_preview
    get :preview, :theme => 'azure'
    assert_response :success
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
typo-3.99.0 test/functional/admin/themes_controller_test.rb
typo-3.99.1 test/functional/admin/themes_controller_test.rb
typo-3.99.3 test/functional/admin/themes_controller_test.rb
typo-3.99.2 test/functional/admin/themes_controller_test.rb
typo-4.0.2 test/functional/admin/themes_controller_test.rb
typo-4.0.1 test/functional/admin/themes_controller_test.rb
typo-3.99.4 test/functional/admin/themes_controller_test.rb
typo-4.0.0 test/functional/admin/themes_controller_test.rb
typo-4.0.3 test/functional/admin/themes_controller_test.rb