diff options
Diffstat (limited to 'spec/factories/events.rb')
-rw-r--r-- | spec/factories/events.rb | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/spec/factories/events.rb b/spec/factories/events.rb index 55727d6b62c..5798b81ecad 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -1,7 +1,8 @@ -FactoryGirl.define do +FactoryBot.define do factory :event do - project factory: :empty_project - author factory: :user + project + author(factory: :user) { project.creator } + action Event::JOINED trait(:created) { action Event::CREATED } trait(:updated) { action Event::UPDATED } @@ -20,4 +21,19 @@ FactoryGirl.define do target factory: :closed_issue end end + + factory :push_event, class: PushEvent do + project factory: :project_empty_repo + author factory: :user + action Event::PUSHED + end + + factory :push_event_payload do + event + commit_count 1 + action :pushed + ref_type :branch + ref 'master' + commit_to '3cdce97ed87c91368561584e7358f4d46e3e173c' + end end |