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