]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Update bounded landuses
[rails.git] / test / controllers / diary_entries_controller_test.rb
index 0c1e655512f23c003898bfc040b0206e8d9b21ff..b474468789d342a5e3a71df904518dd22ad14e79 100644 (file)
@@ -135,7 +135,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
         assert_select "input[name=commit][type=submit][value=Publish]", :count => 1
         assert_select "input[name=commit][type=submit][value=Edit]", :count => 1
         assert_select "input[name=commit][type=submit][value=Preview]", :count => 1
-        assert_select "input", :count => 7
+        assert_select "input", :count => 6
       end
     end
   end
@@ -294,7 +294,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
         assert_select "input[name=commit][type=submit][value=Update]", :count => 1
         assert_select "input[name=commit][type=submit][value=Edit]", :count => 1
         assert_select "input[name=commit][type=submit][value=Preview]", :count => 1
-        assert_select "input", :count => 8
+        assert_select "input", :count => 7
       end
     end
 
@@ -695,9 +695,9 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     assert_template :show
 
     # Try a non-integer ID
-    assert_raise ActionController::RoutingError do
-      get "/user/#{CGI.escape(user.display_name)}/diary/#{diary_entry.id})"
-    end
+    get "/user/#{CGI.escape(user.display_name)}/diary/#{diary_entry.id})"
+    assert_response :not_found
+    assert_template "rescues/routing_error"
 
     # Try a deleted entry
     diary_entry_deleted = create(:diary_entry, :user => user, :visible => false)