fix deletes again (reloading issues this time)

This commit is contained in:
Torsten 2023-01-05 21:50:56 +02:00
parent db82bc5655
commit 178c0ba9d2
3 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,8 @@ module Merged
def delete_and_reset_index
delete_save!
section.reset_index
save
Section.find(section_id).reset_index
Card.save_all
end
def self.new_card(card_template , section_id , index)

View File

@ -78,8 +78,8 @@ module Merged
def delete_and_reset_index
delete
page.reset_index
save
Page.find(page_id).reset_index
Section.save_all
end
def self.new_section(template , page_id , index)

View File

@ -16,7 +16,7 @@ module Merged
section = first.section
index = first.index
first.delete_and_reset_index
assert_equal index , section.cards.second.index
assert_equal index , section.cards.first.index
end
def test_adds
@ -25,6 +25,5 @@ module Merged
assert_equal "NEW" , card.header
end
end
end