summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRiccardo Padovani <riccardo@rpadovani.com>2018-03-07 10:16:38 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-03-07 10:16:38 +0000
commite2bdce8defbbd5a11d50115e3d52498d90417ac2 (patch)
tree5d450508890c9219f2e8e63a911f677aace80c31 /spec
parentcfe203fa3a77adbb33f877c98af5e117b1ccd281 (diff)
downloadgitlab-ce-e2bdce8defbbd5a11d50115e3d52498d90417ac2.tar.gz
Count discussions on issues and merge requests as contributions for the contributions calendar
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/contributions_calendar_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/contributions_calendar_spec.rb b/spec/lib/gitlab/contributions_calendar_spec.rb
index 167876ca158..2c63f3b0455 100644
--- a/spec/lib/gitlab/contributions_calendar_spec.rb
+++ b/spec/lib/gitlab/contributions_calendar_spec.rb
@@ -77,6 +77,13 @@ describe Gitlab::ContributionsCalendar do
expect(calendar(contributor).activity_dates[today]).to eq(1)
end
+ it "counts the discussions on merge requests and issues" do
+ create_event(public_project, today, 0, Event::COMMENTED, :discussion_note_on_merge_request)
+ create_event(public_project, today, 2, Event::COMMENTED, :discussion_note_on_issue)
+
+ expect(calendar(contributor).activity_dates[today]).to eq(2)
+ end
+
context "when events fall under different dates depending on the time zone" do
before do
create_event(public_project, today, 1)