<p><%= t "layouts.osm_read_only" %></p>
<% elsif !current_user.data_public? %>
<p><%= t ".not_public" %></p>
- <p><%= raw t ".not_public_description", :user_page => (link_to t(".user_page_link"), :controller => "user", :action => "account", :display_name => current_user.display_name, :anchor => "public") %></p>
+ <p><%= raw t ".not_public_description", :user_page => (link_to t(".user_page_link"), user_path(current_user, :anchor => "public")) %></p>
<p><%= raw t "site.edit.anon_edits", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %></p>
<% else %>
<%= render :partial => preferred_editor %>
assert_redirected_to :controller => :users, :action => :login, :referer => "/edit"
end
+ # Test the error when trying to edit without public edits
+ def test_edit_non_public
+ get :edit, :session => { :user => create(:user, :data_public => false) }
+ assert_response :success
+ assert_template "edit"
+ assert_select "a[href='https://wiki.openstreetmap.org/wiki/Disabling_anonymous_edits']"
+ end
+
# Test the right editor gets used when the user hasn't set a preference
def test_edit_without_preference
get :edit, :session => { :user => create(:user) }