]> git.openstreetmap.org Git - rails.git/blob - test/functional/old_relation_controller_test.rb
Add some extra indexes.
[rails.git] / test / functional / old_relation_controller_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'old_relation_controller'
3
4 # Re-raise errors caught by the controller.
5 #class OldRelationController; def rescue_action(e) raise e end; end
6
7 class OldRelationControllerTest < Test::Unit::TestCase
8   api_fixtures
9
10   def setup
11     @controller = OldRelationController.new
12     @request    = ActionController::TestRequest.new
13     @response   = ActionController::TestResponse.new
14   end
15
16   # -------------------------------------
17   # Test reading old relations.
18   # -------------------------------------
19
20   def test_history
21     # check that a visible relations is returned properly
22     get :history, :id => relations(:visible_relation).id
23     assert_response :success
24
25     # check chat a non-existent relations is not returned
26     get :history, :id => 0
27     assert_response :not_found
28
29   end
30
31 end