]> git.openstreetmap.org Git - rails.git/blob - test/system/friendships_test.rb
Merge remote-tracking branch 'upstream/pull/5271'
[rails.git] / test / system / friendships_test.rb
1 require "application_system_test_case"
2
3 class FriendshipsTest < ApplicationSystemTestCase
4   test "show message when max frienships limit is exceeded" do
5     befriendee = create(:user)
6
7     sign_in_as create(:user)
8
9     with_settings(:max_friends_per_hour => 0) do
10       visit user_path(befriendee)
11       assert_link "Add Friend"
12
13       click_on "Add Friend"
14       assert_text "You have friended a lot of users recently"
15       assert_link "Add Friend"
16     end
17   end
18 end