]> git.openstreetmap.org Git - rails.git/blob - test/system/user_company_test.rb
Localisation updates from https://translatewiki.net.
[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     company = "Test Company"
8
9     visit user_path(user)
10
11     within_content_heading do
12       assert_no_selector ".bi.bi-suitcase-lg-fill"
13     end
14
15     visit profile_path
16
17     assert_text I18n.t("activerecord.attributes.user.company")
18
19     fill_in "Company", :with => company
20     click_on I18n.t("profiles.show.save")
21
22     assert_text I18n.t("profiles.update.success")
23     within_content_heading do
24       assert_text company
25     end
26   end
27 end