3 class OldWaysControllerTest < ActionDispatch::IntegrationTest
6 { :path => "/way/1/history/2", :method => :get },
7 { :controller => "old_ways", :action => "show", :id => "1", :version => "2" }
12 way = create(:way, :with_history)
13 get old_way_path(way, 1)
14 assert_response :success
15 assert_template "old_ways/show"
16 assert_template :layout => "map"
19 def test_visible_with_shared_nodes
20 node = create(:node, :with_history)
21 way = create(:way, :with_history)
22 create(:way_node, :way => way, :node => node)
23 create(:old_way_node, :old_way => way.old_ways.first, :node => node)
24 sharing_way = create(:way, :with_history)
25 create(:way_node, :way => sharing_way, :node => node)
26 create(:old_way_node, :old_way => sharing_way.old_ways.first, :node => node)
27 get old_way_path(way, 1)
28 assert_response :success
29 assert_template "old_ways/show"
30 assert_template :layout => "map"
34 get old_way_path(0, 0)
35 assert_response :not_found
36 assert_template "old_ways/not_found"
37 assert_template :layout => "map"
38 assert_select "#sidebar_content", /way #0 version 0 could not be found/