Fix UnitsiTest#test_index

This commit is contained in:
2024-12-09 20:00:14 +01:00
parent 40808639cc
commit f3f0b9dc9e
2 changed files with 3 additions and 2 deletions

View File

@@ -12,7 +12,8 @@ class UnitsTest < ApplicationSystemTestCase
assert_selector 'tr', count: @user.units.count
end
Unit.destroy_all
# Cannot #destroy_all due to {dependent: :restrict*} on Unit.subunits association
@user.units.delete_all
visit units_path
within 'tbody' do
assert_selector 'tr', count: 1