]> git.openstreetmap.org Git - rails.git/blob - test/system/user_social_links_test.rb
Add placeholders/titles to social link controls
[rails.git] / test / system / user_social_links_test.rb
1 require "application_system_test_case"
2
3 class UserSocialLinksTest < ApplicationSystemTestCase
4   def setup
5     stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404)
6
7     @user = create(:user)
8     sign_in_as(@user)
9     visit user_path(@user)
10   end
11
12   test "can add social links" do
13     within_content_body do
14       click_on "Edit Profile"
15
16       assert_no_field "Social Profile Link 1"
17
18       click_on "Add Social Link"
19       fill_in "Social Profile Link 1", :with => "https://example.com/user/fred"
20       click_on "Update Profile"
21
22       assert_link "example.com/user/fred"
23     end
24   end
25 end