]> git.openstreetmap.org Git - rails.git/blob - test/system/user_company_test.rb
Add what's updated to profile update flash messages
[rails.git] / test / system / user_company_test.rb
1 require "application_system_test_case"
2
3 class UserCompanyTest < ApplicationSystemTestCase
4   test "User can change company" do
5     user = create(:user)
6     sign_in_as(user)
7
8     visit user_path(user)
9
10     within_content_body do
11       assert_no_text :all, "Company"
12     end
13
14     visit profile_company_path
15
16     within_content_body do
17       fill_in "Company", :with => "Test Co."
18       click_on "Update Profile"
19     end
20
21     assert_text "Profile company updated."
22
23     within_content_body do
24       assert_text :all, "Company Test Co."
25     end
26   end
27 end