X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e91c02f2ceb2b72a77846a0c31f5eca22b9b0a65..ec73d70659686a51f5f4b6b737c9dea1daff8325:/test/controllers/dashboards_controller_test.rb diff --git a/test/controllers/dashboards_controller_test.rb b/test/controllers/dashboards_controller_test.rb index 5073df8cc..c55636585 100644 --- a/test/controllers/dashboards_controller_test.rb +++ b/test/controllers/dashboards_controller_test.rb @@ -10,25 +10,9 @@ class DashboardsControllerTest < ActionDispatch::IntegrationTest ) end - def test_show_no_friends - user = create(:user) - session_for(user) - - get dashboard_path - end - - def test_show_with_friends - user = create(:user, :home_lon => 1.1, :home_lat => 1.1) - friend_user = create(:user, :home_lon => 1.2, :home_lat => 1.2) - create(:friendship, :befriender => user, :befriendee => friend_user) - create(:changeset, :user => friend_user) - session_for(user) - + def test_show_unauthorized get dashboard_path - # Friends should be visible as we're now logged in - assert_select "div#friends-container" do - assert_select "div.contact-activity", :count => 1 - end + assert_redirected_to login_path(:referer => dashboard_path) end end