X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6272b041c6dd9c39cc7a23d6163651e74509da2b..1a7d68ccbceb07e2da90fc0efa61ef448f5383fe:/test/factories/notes.rb?ds=sidebyside diff --git a/test/factories/notes.rb b/test/factories/notes.rb index 63dcd7804..ab7d5df56 100644 --- a/test/factories/notes.rb +++ b/test/factories/notes.rb @@ -5,11 +5,15 @@ FactoryBot.define do # tile { QuadTile.tile_for_point(1,1) } trait :closed do + transient do + closed_by { nil } + end + status { "closed" } closed_at { Time.now.utc } - after(:create) do |note| - create(:note_comment, :body => "Closing comment", :event => "closed", :note => note) + after(:create) do |note, context| + create(:note_comment, :author => context.closed_by, :body => "Closing comment", :event => "closed", :note => note) end end