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