Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-02-23 22:33:16 +0300
committerAndreas Brandl <abrandl@gitlab.com>2018-03-06 14:53:12 +0300
commitebcf3c73bd515a4884961999ef7d33edaba93d57 (patch)
tree8733aa91c1716e681c6451f34138af4da3fb51be /spec/models/event_spec.rb
parentf88d5132c2c94407838e589e450f1b4167fd2629 (diff)
Track which projects a user contributed to.
Closes #43460.
Diffstat (limited to 'spec/models/event_spec.rb')
-rw-r--r--spec/models/event_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb
index 67f49348acb..11f6ae74712 100644
--- a/spec/models/event_spec.rb
+++ b/spec/models/event_spec.rb
@@ -49,6 +49,14 @@ describe Event do
end
end
end
+
+ describe 'after_create :track_user_contributed_projects' do
+ it 'passes event to UserContributedProjects.track' do
+ event = build(:push_event, project: project, author: project.owner)
+ expect(UserContributedProjects).to receive(:track).with(event)
+ event.save
+ end
+ end
end
describe "Push event" do