]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/traces_controller_test.rb
Merge remote-tracking branch 'upstream/pull/3194'
[rails.git] / test / controllers / traces_controller_test.rb
index 36bee9c95135e1e85b9a1282d0dc84a9d2785daa..39a72568fe2eeff7bf94a0f16c13b31d0ffbc699 100644 (file)
@@ -178,7 +178,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
 
     # First try to get it when not logged in
     get traces_mine_path
-    assert_redirected_to :controller => "users", :action => "login", :referer => "/traces/mine"
+    assert_redirected_to login_path(:referer => "/traces/mine")
 
     session_for(user)
 
@@ -541,7 +541,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
     # First with no auth
     get new_trace_path
     assert_response :redirect
-    assert_redirected_to :controller => :users, :action => :login, :referer => new_trace_path
+    assert_redirected_to login_path(:referer => new_trace_path)
 
     # Now authenticated as a user with gps.trace.visibility set
     user = create(:user)
@@ -627,7 +627,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
     # First with no auth
     get edit_trace_path(:display_name => public_trace_file.user.display_name, :id => public_trace_file)
     assert_response :redirect
-    assert_redirected_to :controller => :users, :action => :login, :referer => edit_trace_path(:display_name => public_trace_file.user.display_name, :id => public_trace_file.id)
+    assert_redirected_to login_path(:referer => edit_trace_path(:display_name => public_trace_file.user.display_name, :id => public_trace_file.id))
 
     # Now with some other user, which should fail
     session_for(create(:user))
@@ -768,7 +768,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
         assert_select "tr", :count => traces.length do |rows|
           traces.zip(rows).each do |trace, row|
             assert_select row, "a", Regexp.new(Regexp.escape(trace.name))
-            assert_select row, "span", Regexp.new(Regexp.escape("(#{trace.size} points)")) if trace.inserted?
+            assert_select row, "li", Regexp.new(Regexp.escape("#{trace.size} points")) if trace.inserted?
             assert_select row, "td", Regexp.new(Regexp.escape(trace.description))
             assert_select row, "td", Regexp.new(Regexp.escape("by #{trace.user.display_name}"))
           end