1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'old_relation_controller'
4 class OldRelationControllerTest < ActionController::TestCase
8 # test all routes which lead to this controller
11 { :path => "/api/0.6/relation/1/history", :method => :get },
12 { :controller => "old_relation", :action => "history", :id => "1" }
15 { :path => "/api/0.6/relation/1/2", :method => :get },
16 { :controller => "old_relation", :action => "version", :id => "1", :version => "2" }
20 # -------------------------------------
21 # Test reading old relations.
22 # -------------------------------------
24 # check that a visible relations is returned properly
25 get :history, :id => relations(:visible_relation).relation_id
26 assert_response :success
28 # check chat a non-existent relations is not returned
29 get :history, :id => 0
30 assert_response :not_found