diff options
author | Riccardo Padovani <riccardo@rpadovani.com> | 2018-03-07 13:16:38 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-07 13:16:38 +0300 |
commit | e2bdce8defbbd5a11d50115e3d52498d90417ac2 (patch) | |
tree | 5d450508890c9219f2e8e63a911f677aace80c31 /spec/lib/gitlab/contributions_calendar_spec.rb | |
parent | cfe203fa3a77adbb33f877c98af5e117b1ccd281 (diff) |
Count discussions on issues and merge requests as contributions for the contributions calendar
Diffstat (limited to 'spec/lib/gitlab/contributions_calendar_spec.rb')
-rw-r--r-- | spec/lib/gitlab/contributions_calendar_spec.rb | 7 |
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) |