Sha256: 0d7a57a138aee0548f38f731a8d1216640192fa7b3999ed818ca430b1a67e56d

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

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

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

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

  def setup
    @controller = Admin::GeneralController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new
    @request.session = { :user_id => users(:tobi).id }
  end

  def test_index
    get :index
    assert_template 'index'
  end

  def test_redirect
    get :redirect
    assert_response :redirect, :controller => 'admin/general', :action => 'index'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typo-5.0.1 test/functional/admin/general_controller_test.rb
typo-5.0 test/functional/admin/general_controller_test.rb