mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 08:46:11 +01:00
Also fixed user functional and unit tests to include new functionality. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@191 a4c988fc-2ded-0310-b66e-134b36920a42
20 lines
562 B
Ruby
20 lines
562 B
Ruby
require File.dirname(__FILE__) + '/../test_helper'
|
|
require 'todo_controller'
|
|
|
|
# Re-raise errors caught by the controller.
|
|
class TodoController; def rescue_action(e) raise e end; end
|
|
|
|
class TodoControllerTest < Test::Unit::TestCase
|
|
def setup
|
|
@controller = TodoController.new
|
|
@request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
|
|
end
|
|
|
|
# Test whether unlogged in users are redirected to login
|
|
#
|
|
def test_get_index
|
|
get :index
|
|
assert_redirected_to :controller => 'login', :action => 'login'
|
|
end
|
|
|
|
end
|