X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7e5cbe87ed37f9cba8224fa4049047d7f981f66a..b5046fdcd02b7ae9c10f22fa0b483e6eb2e06fa3:/test/controllers/browse_controller_test.rb diff --git a/test/controllers/browse_controller_test.rb b/test/controllers/browse_controller_test.rb index 7ad16dcd9..82068629d 100644 --- a/test/controllers/browse_controller_test.rb +++ b/test/controllers/browse_controller_test.rb @@ -36,10 +36,6 @@ class BrowseControllerTest < ActionDispatch::IntegrationTest { :path => "/note/1", :method => :get }, { :controller => "browse", :action => "note", :id => "1" } ) - assert_routing( - { :path => "/note/new", :method => :get }, - { :controller => "browse", :action => "new_note" } - ) assert_routing( { :path => "/query", :method => :get }, { :controller => "browse", :action => "query" } @@ -63,7 +59,15 @@ class BrowseControllerTest < ActionDispatch::IntegrationTest end def test_read_node - browse_check :node_path, create(:node).id, "browse/feature" + node = create :node + browse_check :node_path, node.id, "browse/feature" + assert_select "a[href='#{api_node_path node}']", :count => 1 + end + + def test_read_deleted_node + node = create :node, :visible => false + browse_check :node_path, node.id, "browse/feature" + assert_select "a[href='#{api_node_path node}']", :count => 0 end def test_read_node_history @@ -248,12 +252,6 @@ class BrowseControllerTest < ActionDispatch::IntegrationTest assert_select ".browse-section.browse-relation", 2 end - def test_new_note - get note_new_path - assert_response :success - assert_template "browse/new_note" - end - def test_query get query_path assert_response :success