]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/browse_controller_test.rb
Testing, testing, testing...
[rails.git] / test / controllers / browse_controller_test.rb
index a84138184655ad2c63aa3c3f8f764242b9325e79..72bb68937dd91815d1857892d7f5dbf2896a5461 100644 (file)
@@ -71,6 +71,7 @@ class BrowseControllerTest < ActionController::TestCase
 
   def test_read_changeset
     browse_check "changeset", changesets(:normal_user_first_change).id, "browse/changeset"
 
   def test_read_changeset
     browse_check "changeset", changesets(:normal_user_first_change).id, "browse/changeset"
+    browse_check "changeset", changesets(:public_user_first_change).id, "browse/changeset"
   end
 
   def test_read_note
   end
 
   def test_read_note
@@ -150,6 +151,16 @@ class BrowseControllerTest < ActionController::TestCase
       get type, :id => -10 # we won't have an id that's negative
     end
 
       get type, :id => -10 # we won't have an id that's negative
     end
 
+    get type, :id => 0
+    assert_response :not_found
+    assert_template "browse/not_found"
+    assert_template :layout => "map"
+
+    xhr :get, type, :id => 0
+    assert_response :not_found
+    assert_template "browse/not_found"
+    assert_template :layout => "xhr"
+
     get type, :id => id
     assert_response :success
     assert_template template
     get type, :id => id
     assert_response :success
     assert_template template