<% if @user.home_lon and @user.home_lat and contact.home_lon and contact.home_lat %>
<% distance = @user.distance(contact) %>
<% if distance < 1 %>
- (<%= t 'user.show.m away', :count => (distance * 1000).round %>)
+ (<%= t 'users.show.m away', :count => (distance * 1000).round %>)
<% else %>
- (<%= t 'user.show.km away', :count => distance.round %>)
+ (<%= t 'users.show.km away', :count => distance.round %>)
<% end %>
<% end %>
</p>
assert_response :not_found
# Test a normal user
- user = create(:user)
- create(:friend, :befriender => user)
+ user = create(:user, :home_lon => 1.1, :home_lat => 1.1)
+ friend_user = create(:user, :home_lon => 1.2, :home_lat => 1.2)
+ create(:friend, :befriender => user, :befriendee => friend_user)
get :show, :params => { :display_name => user.display_name }
assert_response :success
assert_select "div#userinformation" do