]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/site_controller_test.rb
Use stub_any_instance in order to stub find results.
[rails.git] / test / controllers / site_controller_test.rb
index 453af4550bb25fa58bdba42d313ebf700ccf0b9f..7e387f684f288c3873b4f770411b241328265f2d 100644 (file)
@@ -265,7 +265,9 @@ class SiteControllerTest < ActionController::TestCase
   # Test editing a specific note
   def test_edit_with_note
     user = users(:public_user)
-    note = notes(:open_note)
+    note = create(:note) do |n|
+      n.comments.create(:author_id => user.id)
+    end
 
     get :edit, { :note => note.id }, { :user => user.id }
     assert_response :success
@@ -278,7 +280,7 @@ class SiteControllerTest < ActionController::TestCase
   # Test editing a specific GPX trace
   def test_edit_with_gpx
     user = users(:public_user)
-    gpx  = gpx_files(:public_trace_file)
+    gpx  = create(:trace, :latitude => 1, :longitude => 1)
 
     get :edit, { :gpx => gpx.id }, { :user => user.id }
     assert_response :success