1 require "application_system_test_case"
3 class FriendshipsTest < ApplicationSystemTestCase
4 test "show message when max frienships limit is exceeded" do
5 befriendee = create(:user)
7 sign_in_as create(:user)
9 with_settings(:max_friends_per_hour => 0) do
10 visit user_path(befriendee)
11 assert_link "Add Friend"
14 assert_text "You have friended a lot of users recently"
15 assert_link "Add Friend"