X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1b7ab315bb7d241c5a0521f0810a0981e9031fc4..d48603d9e07c24421309ccedbf554beea715115b:/test/factories/way.rb diff --git a/test/factories/way.rb b/test/factories/way.rb index f5d9ab071..89409e807 100644 --- a/test/factories/way.rb +++ b/test/factories/way.rb @@ -5,5 +5,21 @@ FactoryGirl.define do version 1 changeset + + trait :deleted do + visible false + end + + factory :way_with_nodes do + transient do + nodes_count 1 + end + + after(:create) do |way, evaluator| + (1..evaluator.nodes_count).each do |n| + create(:way_node, :way => way, :sequence_id => n) + end + end + end end end