]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/browse_controller_test.rb
Move browse#new_note to notes#new
[rails.git] / test / controllers / browse_controller_test.rb
index 7ad16dcd982ee8020a583c3cbcf5bc97414a0057..82068629d83bb0a1e46189f6c5fbaf1d50809860 100644 (file)
@@ -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