fix deletes again (reloading issues this time)
This commit is contained in:
parent
db82bc5655
commit
178c0ba9d2
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user