get :read, :params => { :id => id }
assert_response :not_found, "should get a not found"
rescue ActionController::UrlGenerationError => ex
- assert_match /No route matches/, ex.to_s
+ assert_match(/No route matches/, ex.to_s)
end
end
end
put :close, :params => { :id => id }
assert_response :unauthorized, "Shouldn't be able close the non-existant changeset #{id}, when not authorized"
rescue ActionController::UrlGenerationError => ex
- assert_match /No route matches/, ex.to_s
+ assert_match(/No route matches/, ex.to_s)
end
end
put :close, :params => { :id => id }
assert_response :not_found, "The changeset #{id} doesn't exist, so can't be closed"
rescue ActionController::UrlGenerationError => ex
- assert_match /No route matches/, ex.to_s
+ assert_match(/No route matches/, ex.to_s)
end
end
end
new_rel_id = doc.find("//diffResult/relation").first["new_id"].to_i
# check the old IDs are all present and negative one
- assert_equal -1, doc.find("//diffResult/node").first["old_id"].to_i
- assert_equal -1, doc.find("//diffResult/way").first["old_id"].to_i
- assert_equal -1, doc.find("//diffResult/relation").first["old_id"].to_i
+ assert_equal(-1, doc.find("//diffResult/node").first["old_id"].to_i)
+ assert_equal(-1, doc.find("//diffResult/way").first["old_id"].to_i)
+ assert_equal(-1, doc.find("//diffResult/relation").first["old_id"].to_i)
# check the versions are present and equal one
assert_equal 1, doc.find("//diffResult/node").first["new_version"].to_i
def test_index_user_not_found
get :index, :params => { :format => "html", :display_name => "Some random user" }
assert_response :not_found
- assert_template "user/no_such_user"
+ assert_template "users/no_such_user"
get :index, :params => { :format => "html", :display_name => "Some random user", :list => "1" }, :xhr => true
assert_response :not_found
- assert_template "user/no_such_user"
+ assert_template "users/no_such_user"
end
##
get :index, :params => { :friends => true }
assert_response :redirect
- assert_redirected_to :controller => :user, :action => :login, :referer => friend_changesets_path
+ assert_redirected_to :controller => :users, :action => :login, :referer => friend_changesets_path
session[:user] = private_user.id
get :index, :params => { :nearby => true }
assert_response :redirect
- assert_redirected_to :controller => :user, :action => :login, :referer => nearby_changesets_path
+ assert_redirected_to :controller => :users, :action => :login, :referer => nearby_changesets_path
session[:user] = private_user.id