3 class OldRelationsControllerTest < ActionDispatch::IntegrationTest
6 { :path => "/relation/1/history/2", :method => :get },
7 { :controller => "old_relations", :action => "show", :id => "1", :version => "2" }
12 relation = create(:relation, :with_history)
13 get old_relation_path(relation, 1)
14 assert_response :success
15 assert_template "old_relations/show"
16 assert_template :layout => "map"
17 assert_select "h4", /^Version/ do
18 assert_select "a[href='#{old_relation_path relation, 1}']", :count => 0
22 def test_visible_with_members
23 relation = create(:relation, :with_history)
24 create(:old_relation_member, :old_relation => relation.old_relations.first)
25 get old_relation_path(relation, 1)
26 assert_response :success
27 assert_template "old_relations/show"
28 assert_template :layout => "map"
32 get old_relation_path(0, 0)
33 assert_response :not_found
34 assert_template "old_relations/not_found"
35 assert_template :layout => "map"
36 assert_select "#sidebar_content", /relation #0 version 0 could not be found/