X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..6272b041c6dd9c39cc7a23d6163651e74509da2b:/test/factories/notes.rb diff --git a/test/factories/notes.rb b/test/factories/notes.rb index 77b4245aa..63dcd7804 100644 --- a/test/factories/notes.rb +++ b/test/factories/notes.rb @@ -4,6 +4,15 @@ FactoryBot.define do longitude { 1 * GeoRecord::SCALE } # tile { QuadTile.tile_for_point(1,1) } + trait :closed do + status { "closed" } + closed_at { Time.now.utc } + + after(:create) do |note| + create(:note_comment, :body => "Closing comment", :event => "closed", :note => note) + end + end + factory :note_with_comments do transient do comments_count { 1 }