Refine tests

This commit is contained in:
2024-01-17 05:41:08 +01:00
parent 7cfa3a0af0
commit 651534134e
3 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,6 @@ class UnitsTest < ApplicationSystemTestCase
end
end
assert_current_path units_path
within('tbody') do
assert_no_selector :fillable_field
assert_selector 'tr', count: @user.units.count

View File

@@ -84,6 +84,8 @@ class UsersTest < ApplicationSystemTestCase
with: users.reject(&:confirmed?).sample.email
assert_emails 1 do
click_on t(:resend_confirmation)
# Wait until redirected to make sure async request has been processed
assert_current_path new_user_session_path
end
assert_current_path new_user_session_path
assert_text t("devise.confirmations.send_instructions")
@@ -138,8 +140,7 @@ class UsersTest < ApplicationSystemTestCase
end
test "delete profile" do
user = users.select(&:confirmed?).sample
sign_in user: user
user = sign_in
# TODO: remove condition after root_url changed to different path than
# profile in routes.rb
unless has_current_path?(edit_user_registration_path)