Files
nairobi/spec/factories/sdg.rb
Senén Rodero Rodríguez c39c7213c7 Add SDG target model
and its relation with the SDG goal model.

Add comparable module be able to sort collections of targets
by code attribute.

Co-Authored-By: Javi Martín <35156+javierm@users.noreply.github.com>
2020-12-04 15:15:32 +01:00

10 lines
201 B
Ruby

FactoryBot.define do
factory :sdg_goal, class: "SDG::Goal" do
sequence(:code) { |n| n }
end
factory :sdg_target, class: "SDG::Target" do
sequence(:code, 1) { |n| "#{n}.#{n}" }
end
end