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 # -------------------------------------
21 # check that a visible way is returned properly
22 get :history, :id => ways(:visible_way).id
23 assert_response :success
25 # check chat a non-existent way is not returned
26 get :history, :id => 0
27 assert_response :not_found