]> git.openstreetmap.org Git - rails.git/blob - test/system/user_location_change_test.rb
Limit number of directions endpoint geocoding results to 1
[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_heading do
15       assert_no_selector ".bi.bi-geo-alt-fill"
16     end
17
18     visit edit_profile_path
19
20     fill_in "Home location name", :with => "Test Location"
21     click_on "Update Profile"
22
23     assert_text "Profile updated"
24     within_content_heading do
25       assert_text "Test Location"
26     end
27   end
28 end