1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'old_way_controller'
4 # Re-raise errors caught by the controller.
5 class OldWayController; def rescue_action(e) raise e end; end
7 class OldWayControllerTest < Test::Unit::TestCase
11 @controller = OldWayController.new
12 @request = ActionController::TestRequest.new
13 @response = ActionController::TestResponse.new
16 # -------------------------------------
17 # Test reading old ways.
18 # -------------------------------------
20 def test_history_visible
21 # check that a visible way is returned properly
22 get :history, :id => ways(:visible_way).id
23 assert_response :success
26 def test_history_invisible
27 # check chat a non-existent way is not returned
28 get :history, :id => 0
29 assert_response :not_found