Merge remote-tracking branch 'upstream/pull/5107'
This commit is contained in:
commit
6704a6a0dc
4 changed files with 30 additions and 30 deletions
|
@ -9,28 +9,4 @@ class DashboardsControllerTest < ActionDispatch::IntegrationTest
|
|||
{ :controller => "dashboards", :action => "show" }
|
||||
)
|
||||
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)
|
||||
|
||||
get dashboard_path
|
||||
|
||||
# Friends should be visible as we're now logged in
|
||||
assert_select "div#friends-container" do
|
||||
assert_select "div" do
|
||||
assert_select "a[href='/user/#{ERB::Util.u(friend_user.display_name)}']", :count => 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -325,9 +325,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_select "a[href='/blocks/new/#{ERB::Util.u(user.display_name)}']", 0
|
||||
end
|
||||
|
||||
# Friends shouldn't be visible as we're not logged in
|
||||
assert_select "div#friends-container", :count => 0
|
||||
|
||||
# Test a user who has been blocked
|
||||
blocked_user = create(:user)
|
||||
create(:user_block, :user => blocked_user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue