scinote-web/spec/factories/step_reorderable_elements.rb
artoscinote dd27fadd98
Add step reordering and step element reordering service endpoints to API [SCI-6891][SCI-6892] (#4179)
* Add step reordering service endpoint to API [SCI-6891]

* Generalize reorder validation [SCI-6891]

* Add endpoint for reordering step elements, fix issues [SCI-6892]

* Add appropriate serializers [SCI-6891][SCI-6892]

* Add step elements to step serializer [SCI-6891]

* Simplify routes, add locking [SCI-6891]
2022-07-12 10:13:47 +02:00

9 lines
256 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :step_orderable_element do
orderable { create :step_text, step: step }
step
position { step ? step.step_orderable_elements.count : Faker::Number.between(from: 1, to: 10) }
end
end