X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6272b041c6dd9c39cc7a23d6163651e74509da2b..ecd091c976cc8f2a3cf96fe08dc3211aad689ae2:/test/factories/notes.rb 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