diff options
Diffstat (limited to 'spec/models/board_spec.rb')
-rw-r--r-- | spec/models/board_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/models/board_spec.rb b/spec/models/board_spec.rb index 6017298e85b..f469dee5ba1 100644 --- a/spec/models/board_spec.rb +++ b/spec/models/board_spec.rb @@ -8,7 +8,13 @@ RSpec.describe Board do describe 'relationships' do it { is_expected.to belong_to(:project) } - it { is_expected.to have_many(:lists).order(list_type: :asc, position: :asc).dependent(:delete_all) } + + it do + is_expected.to have_many(:lists).order(list_type: :asc, position: :asc).dependent(:delete_all) + .inverse_of(:board) + end + + it { is_expected.to have_many(:destroyable_lists).order(list_type: :asc, position: :asc).inverse_of(:board) } end describe 'validations' do |