3 class DashboardsControllerTest < ActionDispatch::IntegrationTest
5 # test all routes which lead to this controller
8 { :path => "/dashboard", :method => :get },
9 { :controller => "dashboards", :action => "show" }
13 def test_show_no_friends
20 def test_show_with_friends
21 user = create(:user, :home_lon => 1.1, :home_lat => 1.1)
22 friend_user = create(:user, :home_lon => 1.2, :home_lat => 1.2)
23 create(:friendship, :befriender => user, :befriendee => friend_user)
24 create(:changeset, :user => friend_user)
29 # Friends should be visible as we're now logged in
30 assert_select "div#friends-container" do
31 assert_select "div" do
32 assert_select "a[href='/user/#{ERB::Util.u(friend_user.display_name)}']", :count => 1