diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-09-07 16:39:20 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-09-07 16:39:20 +0300 |
commit | d95c1f0335f7309114fcbb0d5413b28e1701a640 (patch) | |
tree | 6b22580a79dd1f929aecd158c31706ce3870c39b /spec/factories/resource_label_events.rb | |
parent | 81f4dc059db91577f72134e6008680b72029a29e (diff) |
Use ResourceLabelEvent for tracking label changes
Diffstat (limited to 'spec/factories/resource_label_events.rb')
-rw-r--r-- | spec/factories/resource_label_events.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/factories/resource_label_events.rb b/spec/factories/resource_label_events.rb index a67ad78c098..739ba901052 100644 --- a/spec/factories/resource_label_events.rb +++ b/spec/factories/resource_label_events.rb @@ -2,9 +2,12 @@ FactoryBot.define do factory :resource_label_event do - user { issue.project.creator } action :add label - issue + user { issuable&.author || create(:user) } + + after(:build) do |event, evaluator| + event.issue = create(:issue) unless event.issuable + end end end |