fix indexing and ordering for section and card

This commit is contained in:
2022-12-11 14:03:21 +02:00
parent 829d653b44
commit 912400b852
13 changed files with 53 additions and 71 deletions

View File

@ -13,5 +13,14 @@ module Merged
it "has index" do
expect(first.index).to eq 1
end
it "first has no previous" do
expect(first.index).to be 1
expect(first.previous_card).to be nil
end
it "first has next" do
expect(first.next_card.index).to be 2
end
end
end

View File

@ -18,7 +18,7 @@ module Merged
end
it "has section indexes" do
index.sections.each_with_index do |section, index|
expect(section.index).to be index + 1
expect(section.index).to be index + 1 # because we have human index
end
end
end