]> git.openstreetmap.org Git - rails.git/blob - test/system/user_location_change_test.rb
Move profile resource to profile/description
[rails.git] / test / system / user_location_change_test.rb
1 require "application_system_test_case"
2
3 class UserLocationChangeTest < ApplicationSystemTestCase
4   def setup
5     stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404)
6   end
7
8   test "User can change their location" do
9     user = create(:user)
10     sign_in_as(user)
11
12     visit user_path(user)
13
14     within_content_body do
15       assert_no_text :all, "Home location"
16     end
17
18     visit profile_description_path
19
20     within_content_body do
21       fill_in "Home Location Name", :with => "Test Place"
22       click_on "Update Profile"
23     end
24
25     assert_text "Profile updated."
26
27     within_content_body do
28       assert_text :all, "Home location Test Place"
29     end
30   end
31 end