mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Add order to Boards
This commit is contained in:
@@ -61,4 +61,13 @@ RSpec.describe PostStatus, type: :model do
|
||||
expect(roadmap.first).to eq(post_status3)
|
||||
expect(roadmap.second).to eq(post_status2)
|
||||
end
|
||||
|
||||
it 'automatically sets order to last order if not specified' do
|
||||
order = 10
|
||||
post_status1 = FactoryBot.create(:post_status, order: order)
|
||||
post_status2 = PostStatus.new
|
||||
|
||||
expect(post_status1.order).to eq(order)
|
||||
expect(post_status2.order).to eq(order + 1)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user